1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
5 <!-- déclaration des groupes d'attributs -->
7 <xs:attributeGroup name="categoryAttrGroup">
8 <xs:attribute ref="name" use="required"/>
9 <xs:attribute ref="id" use="required"/>
10 <xs:attribute ref="parent" use="required"/>
13 <xs:attributeGroup name="blocksAttrGroup">
14 <xs:attribute ref="width" use="required"/>
15 <xs:attribute ref="height" use="required"/>
16 <xs:attribute ref="font" use="required" />
17 <xs:attribute ref="font_size" use="required" />
20 <xs:attributeGroup name="interfacesAttrGroup">
21 <xs:attribute ref="linelength" use="required" />
22 <xs:attribute ref="width" use="required" />
23 <xs:attribute ref="height" use="required" />
24 <xs:attribute ref="font" use="required" />
25 <xs:attribute ref="font_size" use="required" />
29 <!-- déclaration des attributs -->
31 <xs:attribute name="nb">
33 <xs:restriction base="xs:nonNegativeInteger">
34 <xs:minInclusive value="1"/>
39 <xs:attribute name="name" type="xs:string"/>
41 <xs:attribute name="id">
43 <xs:restriction base="xs:nonNegativeInteger">
44 <xs:minInclusive value="0"/>
49 <xs:attribute name="parent">
51 <xs:restriction base="xs:integer">
52 <xs:minInclusive value="-1"/>
57 <xs:attribute name="path" type="xs:string"/>
59 <xs:attribute name="lib_file" type="xs:string"/>
61 <xs:attribute name="width">
63 <xs:restriction base="xs:nonNegativeInteger">
64 <xs:minInclusive value="1"/>
65 <xs:maxInclusive value="1000"/>
70 <xs:attribute name="height">
72 <xs:restriction base="xs:nonNegativeInteger">
73 <xs:minInclusive value="1"/>
74 <xs:maxInclusive value="1000"/>
79 <xs:attribute name="font" type="xs:string"/>
81 <xs:attribute name="font_size">
83 <xs:restriction base="xs:nonNegativeInteger">
84 <xs:minInclusive value="1"/>
89 <xs:attribute name="linelength">
91 <xs:restriction base="xs:nonNegativeInteger">
92 <xs:minInclusive value="1"/>
93 <xs:maxInclusive value="100"/>
98 <xs:attribute name="gaplength">
100 <xs:restriction base="xs:nonNegativeInteger">
101 <xs:minInclusive value="1"/>
102 <xs:maxInclusive value="100"/>
108 <!-- déclaration des groupes d'éléments -->
110 <xs:group name="configElmtGroup">
112 <xs:element ref="categories"/>
113 <xs:element ref="references"/>
114 <xs:element ref="implementations"/>
115 <xs:element ref="defaults" />
119 <xs:group name="defaultsElmtGroup">
121 <xs:element ref="blocks"/>
122 <xs:element ref="interfaces"/>
123 <xs:element ref="connections" />
128 <!-- déclaration des éléments -->
130 <xs:element name="category">
132 <xs:attributeGroup ref="categoryAttrGroup" />
136 <xs:element name="reference_lib">
138 <xs:attribute ref="path" use="required"/>
142 <xs:element name="impl_lib">
144 <xs:attribute ref="path" use="required"/>
148 <xs:element name="blocks">
150 <xs:attributeGroup ref="blocksAttrGroup" />
154 <xs:element name="interfaces">
156 <xs:attributeGroup ref="interfacesAttrGroup" />
160 <xs:element name="connections">
162 <xs:attribute ref="gaplength" use="required"/>
166 <xs:element name="categories">
169 <xs:element ref="category" maxOccurs="unbounded" />
171 <xs:attribute ref="nb" use="required"/>
175 <xs:element name="references">
178 <xs:element ref="reference_lib" maxOccurs="unbounded" />
180 <xs:attribute ref="nb" use="required"/>
181 <xs:attribute ref="lib_file" use="required"/>
185 <xs:element name="implementations">
188 <xs:element ref="impl_lib" maxOccurs="unbounded" />
190 <xs:attribute ref="nb" use="required"/>
191 <xs:attribute ref="lib_file" use="required"/>
195 <xs:element name="defaults">
197 <xs:group ref="defaultsElmtGroup" />
202 <!-- Racine du document -->
204 <xs:element name="config">
206 <xs:group ref="configElmtGroup" />