<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Mr. Andre (Universite De Nice Sophia) -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<!-- Charles André version 0.3 - May 21,  2003 -->
	<!-- Charles André version 0.31 - September 22, 2003 - add name attribute to state -->
	<!-- Charles André version 0.32 - October 27, 2003 - add geometry -->
	<!-- Charles André version 0.33 - March 10, 2004 - tSensor -->
	<!-- SyncChart -->
	<xsd:annotation>
		<xsd:documentation xml:lang="en">
			syncChart XML-schema
			Charles André
			I3S Laboratory
			andre@unice.fr		
		</xsd:documentation>
		<xsd:appinfo>
			<xsd:attribute name="version" fixed="0.32"/>
			<xsd:attribute name="date" fixed="2003.10.27"/>
			<xsd:attribute name="author" fixed="Charles André"/>
			<xsd:attribute name="company" fixed="I3S Laboratory"/>
		</xsd:appinfo>
	</xsd:annotation>
	<!-- -->
	<xsd:element name="syncchart">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:element name="inputs" type="tSignal"/>
					<xsd:element name="outputs" type="tSignal"/>
					<xsd:element name="sensors" type="tSensor"/>
					<xsd:element name="returns" type="tSignal"/>
					<xsd:element name="tdcl" type="tTdcl"/>
					<xsd:element name="fdcl" type="tFdcl"/>
					<xsd:element name="pdcl" type="tPdcl"/>
					<xsd:element name="kdcl" type="tKdcl"/>
					<xsd:element name="rdcl" type="tRdcl"/>
				</xsd:choice>
				<xsd:element ref="macrostate" maxOccurs="unbounded"/>
				<!-- inputs [0..1] -->
				<!-- outputs [0..1] -->
				<!-- sensors [0..1] -->
				<!-- returns [0..1] -->
				<!-- macrostate [1,...]-->
			</xsd:sequence>
			<xsd:attribute name="root" type="stdID" use="required"/>
		</xsd:complexType>
	</xsd:element>
	<!-- -->
	<!-- MacroState -->
	<xsd:element name="macrostate">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="mGeom" type="tMGeom"/>
				<xsd:element name="zGeom" type="tZGeom" maxOccurs="unbounded"/>
				<xsd:element name="decl" type="tDecl"/>
				<xsd:element name="ldcl" type="tLdcl" minOccurs="0"/>
				<xsd:element ref="STG" maxOccurs="unbounded"/>
				<!-- macro geometry [1,1]-->
				<!-- zone geometry [1,*]-->
				<!-- declarations [1,1]-->
				<!-- ldcl [0,1] -->
				<!-- STG [1,*]-->
			</xsd:sequence>
			<xsd:attribute name="id" type="macrostateID" use="required"/>
			<xsd:attribute name="name" type="stdID" use="required"/>
			<xsd:attribute name="andDeg" type="xsd:integer" default="1"/>
			<!-- id [1]-->
			<!-- user name [?] ("") -->
			<!-- nb of STG [?] (1) -->
		</xsd:complexType>
	</xsd:element>
	<!-- -->
	<!-- STG -->
	<xsd:element name="STG">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="vdcl" type="tVdcl" minOccurs="0"/>
				<xsd:element name="initials" type="tInitials"/>
				<xsd:element ref="state" maxOccurs="unbounded"/>
				<!-- vdcl [0,1] -->
				<!-- initials [1,1]-->
				<!-- state [1,*]-->
			</xsd:sequence>
			<xsd:attribute name="id" type="stgID" use="required"/>
			<xsd:attribute name="orDeg" type="xsd:integer" default="1"/>
			<!-- id [1]-->
			<!-- nb of state [?] (1) -->
		</xsd:complexType>
	</xsd:element>
	<!-- -->
	<!-- State -->
	<xsd:element name="state">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:choice>
					<xsd:element name="sGeom" type="tSGeom"/>
					<xsd:element name="mGeom" type="tMGeom"/>
				</xsd:choice>
				<xsd:element name="suspBeam" type="suspBeamType" minOccurs="0"/>
				<xsd:element name="abortion" type="tAbortion" minOccurs="0"/>
				<xsd:element name="body" type="tBody" minOccurs="0"/>
				<!-- either macrostate or state geometry -->
				<!-- optional suspension -->
				<!-- optional abortion -->
				<!-- optional state body [?]-->
			</xsd:sequence>
			<xsd:attribute name="id" type="stateID" use="required"/>
			<xsd:attribute name="name" type="stdID"/>
			<xsd:attribute name="outDeg" type="xsd:integer" default="0"/>
			<xsd:attribute name="final" type="xsd:boolean" default="false"/>
			<!-- id [1]-->
			<!-- id [0,1]-->
			<!-- outDeg [?] (0) -->
			<!-- final [?] (false)-->
		</xsd:complexType>
	</xsd:element>
	<!-- -->
	<!-- -->
	<!-- ========================================= -->
	<!-- Type definitions -->
	<!--
			****************************************
	-->
	<!-- Simple Type Definitions -->
	<!-- -->
	<xsd:simpleType name="tEGeom">
		<xsd:list itemType="xsd:nonNegativeInteger"/>
	</xsd:simpleType>
	<!-- -->
	<!-- State id -->
	<xsd:simpleType name="stateID">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="S(_[0-9]+)+([A-Z]+)([0-9]+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- -->
	<!-- Macrostate id -->
	<xsd:simpleType name="macrostateID">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="M(_[0-9]+)+"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- -->
	<!-- STG id -->
	<xsd:simpleType name="stgID">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[A-Z]+"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- -->
	<!-- Std Id -->
	<xsd:simpleType name="stdID">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[A-Za-z][A-Za-z_0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!--
			****************************************
	-->
	<!-- Complex Type Definitions -->
	<xsd:complexType name="tTdcl">
		<xsd:attribute name="id" type="stdID" use="required"/>
		<!-- type name [1]-->
	</xsd:complexType>
	<!-- -->
	<!-- macro geometry -->
	<!-- -->
	<xsd:complexType name="tSGeom">
		<xsd:attribute name="x" type="xsd:nonNegativeInteger" use="required"/>
		<xsd:attribute name="y" type="xsd:nonNegativeInteger" use="required"/>
		<xsd:attribute name="r" type="xsd:nonNegativeInteger" use="required"/>
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="tZGeom">
		<xsd:attribute name="ext" use="required"/>
		<xsd:attribute name="coords" use="required"/>
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="tLGeom">
		<xsd:attribute name="x" type="xsd:nonNegativeInteger" use="required"/>
		<xsd:attribute name="y" type="xsd:nonNegativeInteger" use="required"/>
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="tMGeom">
		<xsd:attribute name="x" type="xsd:nonNegativeInteger" use="required"/>
		<xsd:attribute name="y" type="xsd:nonNegativeInteger" use="required"/>
		<xsd:attribute name="hw" type="xsd:nonNegativeInteger" use="required"/>
		<xsd:attribute name="hh" type="xsd:nonNegativeInteger" use="required"/>
	</xsd:complexType>
	<!-- -->
	<!-- Declaration types -->
	<!-- -->
	<xsd:complexType name="tSignal">
		<xsd:sequence>
			<xsd:element name="signal" type="sigDeclType" maxOccurs="unbounded"/>
			<!-- input [1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="tSensor">
		<xsd:sequence>
			<xsd:element name="signal" type="withoutInitDeclType" maxOccurs="unbounded"/>
			<!-- input [1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- decl -->
	<xsd:complexType name="tDecl">
		<xsd:sequence>
			<xsd:choice maxOccurs="unbounded">
				<xsd:element name="idcl" type="tIdcl"/>
				<xsd:element name="odcl" type="tOdcl"/>
				<xsd:element name="sdcl" type="tSdcl"/>
				<xsd:element name="tdcl"/>
				<xsd:element name="cdcl" type="tCdcl"/>
				<xsd:element name="fdcl"/>
				<xsd:element name="pdcl"/>
				<xsd:element name="kdcl"/>
				<xsd:element name="rtdcl" type="tRtdcl"/>
				<xsd:element name="rdcl"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- Const decl -->
	<xsd:complexType name="tCdcl" mixed="false">
		<xsd:sequence>
			<xsd:element name="const" type="withInitDeclType" maxOccurs="unbounded"/>
			<!-- consts[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- input signal decl -->
	<xsd:complexType name="tIdcl">
		<xsd:sequence>
			<xsd:element name="signal" type="sigDeclType" maxOccurs="unbounded"/>
			<!-- signals[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- sensor decl -->
	<xsd:complexType name="tSdcl">
		<xsd:sequence>
			<xsd:element name="sensor" type="withoutInitDeclType" maxOccurs="unbounded"/>
			<!-- signals[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- output signal decl -->
	<xsd:complexType name="tOdcl">
		<xsd:sequence>
			<xsd:element name="signal" type="sigDeclType" maxOccurs="unbounded"/>
			<!-- signals[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- return signal decl -->
	<xsd:complexType name="tRtdcl">
		<xsd:sequence>
			<xsd:element name="return" type="sigDeclType" maxOccurs="unbounded"/>
			<!-- signals[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- variable decl -->
	<xsd:complexType name="tVdcl">
		<xsd:sequence>
			<xsd:element name="var" type="withInitDeclType" maxOccurs="unbounded"/>
			<!-- vars[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- local signal decl -->
	<xsd:complexType name="tLdcl">
		<xsd:sequence>
			<xsd:element name="signal" type="sigDeclType" maxOccurs="unbounded"/>
			<!-- signals[1,*] -->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- relation -->
	<xsd:complexType name="tRdcl">
		<xsd:attribute name="expr" type="xsd:string" use="required"/>
		<!-- relation expression[1]-->
	</xsd:complexType>
	<!-- -->
	<!-- Function -->
	<xsd:complexType name="tFdcl">
		<xsd:attribute name="id" type="stdID" use="required"/>
		<xsd:attribute name="param" type="xsd:string"/>
		<xsd:attribute name="return" type="stdID" use="required"/>
		<!-- function name [1]-->
		<!-- param list [1]-->
		<!-- return type [1]-->
	</xsd:complexType>
	<!-- -->
	<!-- Procedure -->
	<xsd:complexType name="tPdcl">
		<xsd:attribute name="id" type="stdID" use="required"/>
		<xsd:attribute name="ref" type="xsd:string"/>
		<xsd:attribute name="param" type="xsd:string"/>
		<!-- proc name [1]-->
		<!-- ref list [1]-->
		<!-- param list [1]-->
	</xsd:complexType>
	<!-- -->
	<!-- Task -->
	<xsd:complexType name="tKdcl">
		<xsd:attribute name="id" type="stdID" use="required"/>
		<xsd:attribute name="ref" type="xsd:string"/>
		<xsd:attribute name="param" type="xsd:string"/>
		<!-- task name [1]-->
		<!-- ref list [1]-->
		<!-- param list [1]-->
	</xsd:complexType>
	<!-- -->
	<!-- abortion -->
	<xsd:complexType name="tAbortion">
		<xsd:sequence>
			<xsd:element name="saBeam" type="abortBeamType" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="waBeam" type="abortBeamType" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="ntBeam" type="ntBeamType" minOccurs="0"/>
			<!-- strong abortBeam [0,*] -->
			<!-- weak abortBeam [0,*] -->
			<!-- normal termination [0,1]-->
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- initials -->
	<xsd:complexType name="tInitials">
		<xsd:sequence>
			<xsd:element name="initBeam" type="initBeamType" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- body -->
	<xsd:complexType name="tBody">
		<xsd:sequence>
			<xsd:choice>
				<xsd:element name="sustain" type="sustainType"/>
				<xsd:element name="run" type="runType"/>
				<!-- sustain signal -->
				<!-- run -->
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
	<!-- -->
	<!-- -->
	<xsd:complexType name="runType">
		<xsd:attribute name="ref" type="macrostateID" use="required"/>
		<xsd:attribute name="name" type="stdID"/>
		<xsd:attribute name="renaming" type="xsd:string"/>
	</xsd:complexType>
	<!-- -->
	<!-- Sustain  -->
	<xsd:complexType name="sustainType">
		<xsd:attribute name="cond" type="xsd:string"/>
		<xsd:attribute name="signal" type="stdID" use="required"/>
		<xsd:attribute name="value" type="xsd:string"/>
		<!-- cond [?] -->
		<!-- signal [1] -->
		<!-- value [?] -->
	</xsd:complexType>
	<!-- -->
	<!-- abortBeamType -->
	<xsd:complexType name="abortBeamType">
		<xsd:sequence>
			<xsd:element name="eGeom" type="tEGeom"/>
			<xsd:element name="lGeom" type="tLGeom" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="imm" type="xsd:boolean" default="false"/>
		<xsd:attribute name="factor" type="xsd:string" default="1"/>
		<xsd:attribute name="trigger" type="xsd:string" default="tick"/>
		<xsd:attribute name="guard" type="xsd:string"/>
		<xsd:attribute name="effect" type="xsd:string"/>
		<xsd:attribute name="to" type="stateID" use="required"/>
		<!-- imm [?] -->
		<!-- factor [?] -->
		<!-- trigger [?] -->
		<!-- guard [?] -->
		<!-- effect [?] -->
		<!-- to [1] -->
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="ntBeamType">
		<xsd:sequence>
			<xsd:element name="eGeom" type="tEGeom"/>
			<xsd:element name="lGeom" type="tLGeom" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="effect" type="xsd:string"/>
		<xsd:attribute name="to" type="stateID" use="required"/>
		<!-- effect [?] -->
		<!-- to [1] -->
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="suspBeamType">
		<xsd:sequence>
			<xsd:element name="eGeom" type="tEGeom"/>
			<xsd:element name="lGeom" type="tLGeom"/>
		</xsd:sequence>
		<xsd:attribute name="imm" type="xsd:boolean" default="false"/>
		<xsd:attribute name="factor" type="xsd:string" default="1"/>
		<xsd:attribute name="trigger" type="xsd:string" default="tick"/>
		<xsd:attribute name="guard" type="xsd:string"/>
		<!-- imm [?] -->
		<!-- factor [?] -->
		<!-- trigger [?] -->
		<!-- guard [?] -->
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="initBeamType">
		<xsd:sequence>
			<xsd:element name="eGeom" type="tEGeom"/>
			<xsd:element name="lGeom" type="tLGeom" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="trigger" type="xsd:string" default="tick"/>
		<xsd:attribute name="guard" type="xsd:string"/>
		<xsd:attribute name="effect" type="xsd:string"/>
		<xsd:attribute name="to" type="stateID" use="required"/>
		<!-- trigger [?] -->
		<!-- guard [?] -->
		<!-- effect [?] -->
		<!-- to [1] -->
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="sigDeclType">
		<xsd:attribute name="name" type="stdID" use="required"/>
		<xsd:attribute name="type" type="stdID"/>
		<xsd:attribute name="init" type="xsd:string"/>
		<!-- signal name [1]-->
		<!-- signal type [?]-->
		<!-- signal init [?]-->
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="withoutInitDeclType">
		<xsd:attribute name="name" type="stdID" use="required"/>
		<xsd:attribute name="type" type="stdID" use="required"/>
		<!-- sensor name [1]-->
		<!-- sensor type [1]-->
	</xsd:complexType>
	<!-- -->
	<xsd:complexType name="withInitDeclType">
		<xsd:attribute name="name" type="stdID" use="required"/>
		<xsd:attribute name="type" type="stdID" use="required"/>
		<xsd:attribute name="init" type="xsd:string"/>
		<!-- var/const name [1]-->
		<!-- var/const type [1]-->
		<!-- var/const init [?]-->
	</xsd:complexType>
	<!-- -->
</xsd:schema>

