XMLSchema > Attributes : a small step
This commit is contained in:
parent
2383f21e7b
commit
7d0719a227
|
@ -2,7 +2,7 @@
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
|
||||||
<!-- https://www.w3schools.com/xml/el_attribute.asp -->
|
<!-- https://www.w3schools.com/xml/el_attribute.asp -->
|
||||||
<!-- use="required" should be allowed ?!-->
|
<!-- use="required" is NOT allowed in attributes declarations-->
|
||||||
|
|
||||||
<xs:attribute name="id" type="xs:string"/>
|
<xs:attribute name="id" type="xs:string"/>
|
||||||
<xs:attribute name="date" type="xs:integer"/> <!--TODO type ? -->
|
<xs:attribute name="date" type="xs:integer"/> <!--TODO type ? -->
|
||||||
|
@ -12,11 +12,11 @@
|
||||||
<xs:attribute name="version" type="xs:float"/>
|
<xs:attribute name="version" type="xs:float"/>
|
||||||
<xs:attribute name="owner_id" type="xs:integer"/>
|
<xs:attribute name="owner_id" type="xs:integer"/>
|
||||||
|
|
||||||
<xs:attribute name="x" type="xs:integer"/>
|
<xs:attribute name="x" type="xs:integer" default="1"/>
|
||||||
<xs:attribute name="y" type="xs:integer"/>
|
<xs:attribute name="y" type="xs:integer" default="0"/>
|
||||||
<xs:attribute name="z" type="xs:integer"/>
|
<xs:attribute name="z" type="xs:integer" default="0"/>
|
||||||
<xs:attribute name="site" type="xs:integer"/>
|
<xs:attribute name="site" type="xs:integer" default="1"/>
|
||||||
<xs:attribute name="weight" type="xs:integer"/>
|
<xs:attribute name="weight" type="xs:integer" default="0"/>
|
||||||
|
|
||||||
<xs:element name="gem-graph-model">
|
<xs:element name="gem-graph-model">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<xs:element name="name">
|
<xs:element name="name">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute name="value" type="xs:string"/>
|
<xs:attribute name="value" type="xs:string" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
@ -52,13 +52,13 @@
|
||||||
|
|
||||||
<xs:element name="max_thread">
|
<xs:element name="max_thread">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute ref="value"/>
|
<xs:attribute ref="value" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="max_cycles">
|
<xs:element name="max_cycles">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute ref="value"/>
|
<xs:attribute ref="value" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
@ -72,19 +72,19 @@
|
||||||
|
|
||||||
<xs:element name="dimension">
|
<xs:element name="dimension">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute ref="value"/>
|
<xs:attribute ref="value" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="size">
|
<xs:element name="size">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute ref="value"/>
|
<xs:attribute ref="value" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="site_multiplicity">
|
<xs:element name="site_multiplicity">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute ref="value"/>
|
<xs:attribute ref="value" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
@ -98,9 +98,9 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute ref="id"/>
|
<xs:attribute ref="id" use="required"/>
|
||||||
<xs:attribute ref="date"/>
|
<xs:attribute ref="date" use="required"/>
|
||||||
<xs:attribute ref="author"/>
|
<xs:attribute ref="author" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
@ -110,18 +110,18 @@
|
||||||
|
|
||||||
<xs:element name="arrow">
|
<xs:element name="arrow">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attribute ref="x"/>
|
<xs:attribute ref="x" use="required"/>
|
||||||
<xs:attribute ref="y"/>
|
<xs:attribute ref="y" use="required"/>
|
||||||
<xs:attribute ref="z"/>
|
<xs:attribute ref="z" use="required"/>
|
||||||
<xs:attribute ref="site"/>
|
<xs:attribute ref="site" use="required"/>
|
||||||
<xs:attribute ref="weight"/>
|
<xs:attribute ref="weight" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute ref="id"/>
|
<xs:attribute ref="id" use="required"/>
|
||||||
<xs:attribute ref="date"/>
|
<xs:attribute ref="date" use="required"/>
|
||||||
<xs:attribute ref="author"/>
|
<xs:attribute ref="author" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue