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">
|
||||
|
||||
<!-- 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="date" type="xs:integer"/> <!--TODO type ? -->
|
||||
|
@ -12,11 +12,11 @@
|
|||
<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:attribute name="x" type="xs:integer" default="1"/>
|
||||
<xs:attribute name="y" type="xs:integer" default="0"/>
|
||||
<xs:attribute name="z" type="xs:integer" default="0"/>
|
||||
<xs:attribute name="site" type="xs:integer" default="1"/>
|
||||
<xs:attribute name="weight" type="xs:integer" default="0"/>
|
||||
|
||||
<xs:element name="gem-graph-model">
|
||||
<xs:complexType>
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
<xs:element name="name">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:string"/>
|
||||
<xs:attribute name="value" type="xs:string" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -52,13 +52,13 @@
|
|||
|
||||
<xs:element name="max_thread">
|
||||
<xs:complexType>
|
||||
<xs:attribute ref="value"/>
|
||||
<xs:attribute ref="value" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="max_cycles">
|
||||
<xs:complexType>
|
||||
<xs:attribute ref="value"/>
|
||||
<xs:attribute ref="value" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -72,19 +72,19 @@
|
|||
|
||||
<xs:element name="dimension">
|
||||
<xs:complexType>
|
||||
<xs:attribute ref="value"/>
|
||||
<xs:attribute ref="value" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="size">
|
||||
<xs:complexType>
|
||||
<xs:attribute ref="value"/>
|
||||
<xs:attribute ref="value" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="site_multiplicity">
|
||||
<xs:complexType>
|
||||
<xs:attribute ref="value"/>
|
||||
<xs:attribute ref="value" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -98,9 +98,9 @@
|
|||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="id"/>
|
||||
<xs:attribute ref="date"/>
|
||||
<xs:attribute ref="author"/>
|
||||
<xs:attribute ref="id" use="required"/>
|
||||
<xs:attribute ref="date" use="required"/>
|
||||
<xs:attribute ref="author" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
@ -110,18 +110,18 @@
|
|||
|
||||
<xs:element name="arrow">
|
||||
<xs:complexType>
|
||||
<xs:attribute ref="x"/>
|
||||
<xs:attribute ref="y"/>
|
||||
<xs:attribute ref="z"/>
|
||||
<xs:attribute ref="site"/>
|
||||
<xs:attribute ref="weight"/>
|
||||
<xs:attribute ref="x" use="required"/>
|
||||
<xs:attribute ref="y" use="required"/>
|
||||
<xs:attribute ref="z" use="required"/>
|
||||
<xs:attribute ref="site" use="required"/>
|
||||
<xs:attribute ref="weight" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="id"/>
|
||||
<xs:attribute ref="date"/>
|
||||
<xs:attribute ref="author"/>
|
||||
<xs:attribute ref="id" use="required"/>
|
||||
<xs:attribute ref="date" use="required"/>
|
||||
<xs:attribute ref="author" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
|
Loading…
Reference in New Issue