XMLSchema > Attributes : a small step
This commit is contained in:
parent
e910a2958f
commit
2383f21e7b
|
@ -1,27 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gem-graph-model>
|
||||
|
||||
<identity>
|
||||
<model_name>Modèle de test</model_name>
|
||||
<anything_but_not_just_the_word_name>Modèle de test</anything_but_not_just_the_word_name>
|
||||
<name value="(Trois dimères)"/>
|
||||
<owner_id>2</owner_id>
|
||||
<date>1629830000</date>
|
||||
<version>1.0</version>
|
||||
</identity>
|
||||
|
||||
<parameters id="0" date="0" author="Gaston Lagaffe">
|
||||
<modelization>
|
||||
<max_thread value="0"/>
|
||||
<max_cycles value="13"/>
|
||||
</modelization>
|
||||
<space>
|
||||
|
||||
<modelization>
|
||||
<max_thread value="0"/>
|
||||
<max_cycles value="13"/>
|
||||
</modelization>
|
||||
|
||||
<space>
|
||||
<dimension value="1"/>
|
||||
<size value="39"/>
|
||||
<site_multiplicity value="2"/>
|
||||
<boundaries/>
|
||||
</space>
|
||||
</space>
|
||||
|
||||
</parameters>
|
||||
|
||||
<objects id="dimer" date="1629830000" author="Jean Sirmai">
|
||||
<arrow x="0" y="0" z="0" site="0" weight="0"/>
|
||||
</objects>
|
||||
|
||||
<space>aaa</space>
|
||||
<savestates>aaa</savestates>
|
||||
<transitions>aaa</transitions>
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<!-- https://www.w3schools.com/xml/el_attribute.asp -->
|
||||
<!-- use="required" should be allowed ?!-->
|
||||
|
||||
<xs:attribute name="id" type="xs:string"/>
|
||||
<xs:attribute name="date" type="xs:integer"/> <!--TODO type ? -->
|
||||
<xs:attribute name="name" type="xs:string"/> <!--TODO pas clair, ce truc... -->
|
||||
<xs:attribute name="value" type="xs:integer"/> <!--TODO WARNING: It's an integer !-->
|
||||
<xs:attribute name="author" type="xs:string"/>
|
||||
<xs:attribute name="version" type="xs:float"/>
|
||||
<xs:attribute name="owner_id" type="xs:integer"/>
|
||||
|
||||
<xs:attribute name="x" type="xs:integer"/>
|
||||
<xs:attribute name="y" type="xs:integer"/>
|
||||
<xs:attribute name="z" type="xs:integer"/>
|
||||
<xs:attribute name="site" type="xs:integer"/>
|
||||
<xs:attribute name="weight" type="xs:integer"/>
|
||||
|
||||
<xs:element name="gem-graph-model">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
@ -9,13 +26,13 @@
|
|||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
||||
<xs:element name="model_name" type="xs:string"/>
|
||||
<xs:element name="anything_but_not_just_the_word_name" type="xs:string"/>
|
||||
|
||||
<xs:element name="name">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="name">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="owner_id" type="xs:integer"/>
|
||||
<xs:element name="date" type="xs:integer"/>
|
||||
|
@ -35,13 +52,13 @@
|
|||
|
||||
<xs:element name="max_thread">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:integer"/>
|
||||
<xs:attribute ref="value"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="max_cycles">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:integer"/>
|
||||
<xs:attribute ref="value"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -55,19 +72,19 @@
|
|||
|
||||
<xs:element name="dimension">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:integer"/>
|
||||
<xs:attribute ref="value"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="size">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:integer"/>
|
||||
<xs:attribute ref="value"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="site_multiplicity">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:integer"/>
|
||||
<xs:attribute ref="value"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -81,9 +98,9 @@
|
|||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:string"/>
|
||||
<xs:attribute name="date" type="xs:integer"/>
|
||||
<xs:attribute name="author" type="xs:string"/>
|
||||
<xs:attribute ref="id"/>
|
||||
<xs:attribute ref="date"/>
|
||||
<xs:attribute ref="author"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -93,18 +110,18 @@
|
|||
|
||||
<xs:element name="arrow">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="x" type="xs:integer"/>
|
||||
<xs:attribute name="y" type="xs:integer"/>
|
||||
<xs:attribute name="z" type="xs:integer"/>
|
||||
<xs:attribute name="site" type="xs:integer"/>
|
||||
<xs:attribute name="weight" type="xs:integer"/>
|
||||
<xs:attribute ref="x"/>
|
||||
<xs:attribute ref="y"/>
|
||||
<xs:attribute ref="z"/>
|
||||
<xs:attribute ref="site"/>
|
||||
<xs:attribute ref="weight"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:string"/>
|
||||
<xs:attribute name="date" type="xs:integer"/>
|
||||
<xs:attribute name="author" type="xs:string"/>
|
||||
<xs:attribute ref="id"/>
|
||||
<xs:attribute ref="date"/>
|
||||
<xs:attribute ref="author"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
|
Loading…
Reference in New Issue