|
|
@@ -0,0 +1,153 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<xsd:schema
|
|
|
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
|
+ xmlns:sccd="msdl.uantwerpen.be/sccd"
|
|
|
+ targetNamespace="msdl.uantwerpen.be/sccd"
|
|
|
+ elementFormDefault="qualified"
|
|
|
+ attributeFormDefault="unqualified">
|
|
|
+
|
|
|
+ <!-- First, some type declarations... -->
|
|
|
+
|
|
|
+ <xsd:simpleType name="identifier">
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:pattern value="([A-Za-z0-9]|_)+"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="stateId">
|
|
|
+ <xsd:restriction base="sccd:identifier"/>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="portName">
|
|
|
+ <xsd:restriction base="sccd:identifier"/>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="className">
|
|
|
+ <xsd:restriction base="sccd:identifier"/>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <!-- Used for 'onentry', 'onexit' and 'transition' -->
|
|
|
+ <xsd:complexType name="hasActions">
|
|
|
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
|
|
|
+ <xsd:element name="raise">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:attribute name="event" type="xsd:string" use="required"/>
|
|
|
+ <xsd:attribute name="port" type="sccd:portName"/>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ <xsd:element name="script" type="xsd:string"/>
|
|
|
+ </xsd:choice>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ Recursive type.
|
|
|
+
|
|
|
+ Basically all the common stuff of basic/or/and states.
|
|
|
+ An element of this type does not have an 'id' attribute, but all its children
|
|
|
+ states do.
|
|
|
+ The reason we don't include state id's at the highest level is because
|
|
|
+ the root of a diagram is also a state (an or-state, to be specific),
|
|
|
+ but it has no id.
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="commonState" abstract="true">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="onentry" minOccurs="0" type="sccd:hasActions"/>
|
|
|
+ <xsd:element name="onexit" minOccurs="0" type="sccd:hasActions"/>
|
|
|
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
|
|
|
+ <!-- Every state can have any number of <state> and <parallel> elements in it.
|
|
|
+ These elements always have an 'id' attribute. -->
|
|
|
+ <xsd:element name="state">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="sccd:orState">
|
|
|
+ <xsd:attribute name="id" type="sccd:stateId" use="required"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ <xsd:element name="parallel">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="sccd:commonState">
|
|
|
+ <xsd:attribute name="id" type="sccd:stateId" use="required"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ <xsd:element name="transition">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="sccd:hasActions">
|
|
|
+ <xsd:attribute name="target" type="xsd:string" use="required"/>
|
|
|
+ <xsd:attribute name="after" type="xsd:decimal"/>
|
|
|
+ <xsd:attribute name="cond" type="xsd:string"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ </xsd:choice>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!-- Just like commonState, also without 'id' attribute -->
|
|
|
+ <xsd:complexType name="orState">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="sccd:commonState">
|
|
|
+ <xsd:attribute name="initial" type="xsd:string"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:attributeGroup name="semanticOptions">
|
|
|
+ <xsd:attribute name="big_step_maximality">
|
|
|
+ <xsd:simpleType>
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:enumeration value="take_one"/>
|
|
|
+ <xsd:enumeration value="take_many"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+ </xsd:attribute>
|
|
|
+ </xsd:attributeGroup>
|
|
|
+
|
|
|
+ <xsd:complexType name="portDecl">
|
|
|
+ <xsd:attribute name="name" type="sccd:portName"/>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!-- Root element -->
|
|
|
+ <xsd:element name="diagram">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="description" type="xsd:string" minOccurs="0"/>
|
|
|
+ <xsd:element name="inport" minOccurs="0" maxOccurs="unbounded" type="sccd:portDecl"/>
|
|
|
+ <xsd:element name="outport" minOccurs="0" maxOccurs="unbounded" type="sccd:portDecl"/>
|
|
|
+ <xsd:element name="class" maxOccurs="unbounded">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="scxml" minOccurs="0">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="sccd:orState">
|
|
|
+ <xsd:attributeGroup ref="sccd:semanticOptions"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ </xsd:sequence>
|
|
|
+ <xsd:attribute name="name" type="sccd:className" use="required"/>
|
|
|
+ <xsd:attribute name="default" type="xsd:boolean"/>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ <xsd:element name="test" minOccurs="0">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ </xsd:sequence>
|
|
|
+ <xsd:attribute name="author" type="xsd:string"/>
|
|
|
+ <xsd:attribute name="name" type="xsd:string"/>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+
|
|
|
+</xsd:schema>
|