<?xml version="1.0" encoding="windows-1252"?>

<xsd:schema  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://camitk.imag.fr/3/smallScxml"
            xmlns="http://camitk.imag.fr/3/smallScxml"
            xmlns:camitk="http://camitk.imag.fr/3/asm"
            elementFormDefault="qualified">

    <xsd:import namespace="http://camitk.imag.fr/3/asm" schemaLocation="camitkAsm.xsd"/>
    
    <xsd:element name="scxml" type="Scxml"/>
    
    <xsd:annotation>
        <xsd:documentation>
             This schema is freely adapted from W3C State Chart XML (SCXML) 
             language (http://www.w3.org/2005/07/scxml).

             It contains a limited version of SCXML, with less features
             (the only ones supported by CamiTK Action State Machine).
        </xsd:documentation>
    </xsd:annotation>

    <xsd:complexType name="Scxml">
        <xsd:sequence>
            <xsd:element name="state" type="State" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attributeGroup ref="scxmlAttributes"/>
        <xsd:attributeGroup ref="camitk:scxmlCamitkAttributes"/>
    </xsd:complexType>

    <xsd:attributeGroup name="scxmlAttributes">
        <xsd:attribute name="initial" type="xsd:string" use="required"/>
    </xsd:attributeGroup>

    <xsd:complexType name="State">
        <xsd:sequence>
            <xsd:element name="onentry"     type="OnEntry"/>
            <xsd:element name="transition"  type="Transition" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="id"      type="xsd:string" use="required"/>
        <xsd:attribute name="final"   type="xsd:boolean" use="optional" default="false"/>
    </xsd:complexType>
    
    <xsd:complexType name="OnEntry">
        <xsd:sequence>
            <xsd:any namespace="http://camitk.imag.fr/3/asm" minOccurs="0"/> 
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="Transition">
        <xsd:sequence>
            <xsd:any namespace="http://camitk.imag.fr/3/asm" minOccurs="0"/> 
        </xsd:sequence>
        <xsd:attribute name="event"  type="xsd:string"  use="required"/>
        <xsd:attribute name="target" type="xsd:string"  use="required"/>
        <xsd:attributeGroup ref="camitk:transitionCamitkAttributes"/> 
    </xsd:complexType>
</xsd:schema>
