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="sources"/>
116 <xs:element ref="defaults" />
120 <xs:group name="defaultsElmtGroup">
122 <xs:element ref="blocks"/>
123 <xs:element ref="interfaces"/>
124 <xs:element ref="connections" />
129 <!-- déclaration des éléments -->
131 <xs:element name="category">
133 <xs:attributeGroup ref="categoryAttrGroup" />
137 <xs:element name="reference_lib">
139 <xs:attribute ref="path" use="required"/>
143 <xs:element name="impl_lib">
145 <xs:attribute ref="path" use="required"/>
149 <xs:element name="source_lib">
151 <xs:attribute ref="path" use="required"/>
155 <xs:element name="blocks">
157 <xs:attributeGroup ref="blocksAttrGroup" />
161 <xs:element name="interfaces">
163 <xs:attributeGroup ref="interfacesAttrGroup" />
167 <xs:element name="connections">
169 <xs:attribute ref="gaplength" use="required"/>
173 <xs:element name="categories">
176 <xs:element ref="category" maxOccurs="unbounded" />
181 <xs:element name="references">
184 <xs:element ref="reference_lib" maxOccurs="unbounded" />
186 <xs:attribute ref="nb" use="required"/>
187 <xs:attribute ref="lib_file" use="required"/>
191 <xs:element name="implementations">
194 <xs:element ref="impl_lib" maxOccurs="unbounded" />
196 <xs:attribute ref="nb" use="required"/>
197 <xs:attribute ref="lib_file" use="required"/>
201 <xs:element name="sources">
204 <xs:element ref="source_lib" maxOccurs="unbounded" />
206 <xs:attribute ref="nb" use="required"/>
210 <xs:element name="defaults">
212 <xs:group ref="defaultsElmtGroup" />
217 <!-- Racine du document -->
219 <xs:element name="config">
221 <xs:group ref="configElmtGroup" />