XML Schema States OK (before Transitions)
This commit is contained in:
parent
4fc99aee92
commit
b70a940f36
|
@ -25,23 +25,48 @@
|
|||
|
||||
</parameters>
|
||||
|
||||
<objects id="dimer" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="0" weight="0"/>
|
||||
<objects id="A list of connex states" date="1629830000" author="Jean Sirmai">
|
||||
|
||||
<state id="dimer 1-1" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="1" weight="1"/>
|
||||
<arrow x="1" y="0" z="0" site="0" weight="1"/>
|
||||
</state>
|
||||
|
||||
<state id="dimer 2-2" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="1" weight="2"/>
|
||||
<arrow x="1" y="0" z="0" site="0" weight="2"/>
|
||||
</state>
|
||||
|
||||
<state id="dimer 3-3" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="1" weight="3"/>
|
||||
<arrow x="1" y="0" z="0" site="0" weight="3"/>
|
||||
</state>
|
||||
|
||||
<!-- Just for the fun ! Can you imagine some rules in a next model ? -->
|
||||
<state id="dimer 1-2" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="1" weight="1"/>
|
||||
<arrow x="1" y="0" z="0" site="0" weight="2"/>
|
||||
</state>
|
||||
|
||||
</objects>
|
||||
|
||||
<initial_state id="test" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="1" weight="1"/>
|
||||
<arrow x="1" y="0" z="0" site="0" weight="1"/>
|
||||
<arrow x="10" y="0" z="0" site="1" weight="1"/>
|
||||
<arrow x="11" y="0" z="0" site="0" weight="1"/>
|
||||
<arrow x="20" y="0" z="0" site="1" weight="1"/>
|
||||
<arrow x="21" y="0" z="0" site="0" weight="1"/>
|
||||
<!-- three dimers have been defined-->
|
||||
<state id="initial state" date="1629830000" author="Jean Sirmai">
|
||||
<!-- three dimers of three types (1-1, 2-2, 3-3) are defined in three locations-->
|
||||
|
||||
</initial_state>
|
||||
<arrow x="0" y="0" z="0" site="1" weight="1"/>
|
||||
<arrow x="1" y="0" z="0" site="0" weight="1"/>
|
||||
|
||||
<saved_states></saved_states>
|
||||
<transitions>aaa</transitions>
|
||||
<ref>aaa</ref>
|
||||
<quote>aaa</quote>
|
||||
<arrow x="10" y="0" z="0" site="1" weight="2"/>
|
||||
<arrow x="11" y="0" z="0" site="0" weight="2"/>
|
||||
|
||||
<arrow x="20" y="0" z="0" site="1" weight="3"/>
|
||||
<arrow x="21" y="0" z="0" site="0" weight="3"/>
|
||||
|
||||
</state>
|
||||
|
||||
<produced_states id="a computed state" date="00000" author="THE MATRIX (you know it...)">
|
||||
</produced_states>
|
||||
<transitions></transitions>
|
||||
<ref></ref>
|
||||
<quote></quote>
|
||||
</gem-graph-model>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<!-- https://www.w3schools.com/xml/el_attribute.asp -->
|
||||
<!-- use="required" is NOT allowed in attributes declarations-->
|
||||
<!-- Attribute 'name' Cannot Appear In Element 'element'.-->
|
||||
|
||||
<xs:attribute name="id" type="xs:string"/>
|
||||
<xs:attribute name="date" type="xs:integer"/> <!--TODO type ? -->
|
||||
|
@ -22,6 +23,17 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="state"> <!-- A connex state is an object. -->
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element ref="arrow"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="id" use="required"/>
|
||||
<xs:attribute ref="date" use="required"/>
|
||||
<xs:attribute ref="author" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="gem-graph-model">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
@ -111,9 +123,7 @@
|
|||
<xs:element name="objects">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
|
||||
<xs:element ref="arrow"/>
|
||||
|
||||
<xs:element ref="state"/> <!--An object is a connex state -->
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="id" use="required"/>
|
||||
<xs:attribute ref="date" use="required"/>
|
||||
|
@ -121,12 +131,14 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="initial_state">
|
||||
<!--An initial state is made of at least one object -->
|
||||
<xs:element ref="state"/>
|
||||
|
||||
<!--An produced state is made of at least one object -->
|
||||
<xs:element name="produced_states">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
|
||||
<xs:element ref="arrow"/>
|
||||
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="state"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="id" use="required"/>
|
||||
<xs:attribute ref="date" use="required"/>
|
||||
|
@ -134,7 +146,6 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="saved_states" type="xs:string"/>
|
||||
<xs:element name="transitions" type="xs:string"/>
|
||||
<xs:element name="ref" type="xs:string"/>
|
||||
<xs:element name="quote" type="xs:string"/>
|
||||
|
|
Loading…
Reference in New Issue