1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
4 <!-- déclaration des groupes d'attributs -->
6 <xs:attributeGroup name="parameterAttrGroup">
7 <xs:attribute ref="name" use="required"/>
8 <xs:attribute name="type" type="typeparam" use="required"/>
9 <xs:attribute ref="wishbone" use="optional"/>
10 <xs:attribute ref="value" use="optional"/>
11 <xs:attribute ref="iface" use="optional"/>
12 <xs:attribute ref="width" use="optional"/>
13 <xs:attribute ref="context" use="required"/>
16 <xs:attributeGroup name="inOutAttrGroup">
17 <xs:attribute ref="name" use="required"/>
18 <xs:attribute ref="width" use="required"/>
19 <xs:attribute name="type" type="typeiface"/>
20 <xs:attribute ref="purpose"/>
21 <xs:attribute ref="multiplicity"/>
25 <!-- déclaration des attributs -->
27 <xs:attribute name="ids" type="xs:string"/>
28 <xs:attribute name="name" type="xs:string"/>
30 <xs:simpleType name="typeparam">
31 <xs:restriction base="xs:string">
32 <xs:enumeration value="string"/>
33 <xs:enumeration value="expression"/>
34 <xs:enumeration value="boolean"/>
35 <xs:enumeration value="integer"/>
36 <xs:enumeration value="natural"/>
37 <xs:enumeration value="positive"/>
38 <xs:enumeration value="real"/>
39 <xs:enumeration value="time"/>
43 <xs:simpleType name="typeiface">
44 <xs:restriction base="xs:string">
45 <xs:enumeration value="expression"/>
46 <xs:enumeration value="boolean"/>
47 <xs:enumeration value="natural"/>
51 <xs:attribute name="wishbone" type="xs:string"/>
52 <xs:attribute name="context" type="xs:string" />
53 <xs:attribute name="multiplicity" type="xs:string" />
54 <xs:attribute name="width" type="xs:string"/>
55 <xs:attribute name="purpose" type="xs:string"/>
56 <xs:attribute name="value" type="xs:string"/>
57 <xs:attribute name="iface" type="xs:string"/>
58 <xs:attribute name="path" type="xs:string" />
61 <!-- déclaration des groupes d'éléments -->
63 <xs:group name="blockElmtGroup">
65 <xs:element ref="informations"/>
66 <xs:element ref="parameters"/>
67 <xs:element ref="interfaces"/>
68 <xs:element ref="implementations" minOccurs="0"/>
72 <xs:group name="informationsElmtGroup">
74 <xs:element ref="name"/>
75 <xs:element ref="category"/>
76 <xs:element ref="description"/>
80 <xs:group name="descriptionElmtGroup">
82 <xs:element ref="brief"/>
83 <xs:element ref="detailed"/>
87 <xs:group name="interfacesElmtGroup">
89 <xs:element ref="inputs" minOccurs="0"/>
90 <xs:element ref="outputs" minOccurs="1"/>
91 <xs:element ref="bidirs" minOccurs="0"/>
96 <!-- déclaration des éléments -->
98 <xs:element name="informations">
100 <xs:group ref="informationsElmtGroup"/>
104 <xs:element name="name" type="xs:string" />
106 <xs:element name="category">
108 <xs:attribute ref="ids" use="required"/>
112 <xs:element name="description">
114 <xs:group ref="descriptionElmtGroup"/>
118 <xs:element name="brief" type="xs:string" />
120 <xs:element name="detailed" type="xs:string" />
122 <xs:element name="parameters">
125 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
130 <xs:element name="parameter">
132 <xs:attributeGroup ref="parameterAttrGroup"/>
136 <xs:element name="interfaces">
138 <xs:group ref="interfacesElmtGroup"/>
142 <xs:element name="control">
144 <xs:attribute ref="iface"/>
148 <xs:element name="inputs">
151 <xs:element ref="input" maxOccurs="unbounded" />
152 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
157 <xs:element name="input">
159 <xs:attributeGroup ref="inOutAttrGroup"/>
163 <xs:element name="outputs">
166 <xs:element ref="output" maxOccurs="unbounded" />
167 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
172 <xs:element name="output">
174 <xs:attributeGroup ref="inOutAttrGroup"/>
178 <xs:element name="bidirs">
181 <xs:element ref="bidir" maxOccurs="unbounded" />
186 <xs:element name="bidir">
188 <xs:attributeGroup ref="inOutAttrGroup"/>
192 <xs:element name="implementations">
195 <xs:element ref="implementation" maxOccurs="unbounded" />
200 <xs:element name="implementation">
202 <xs:attribute ref="path" use="required" />
207 <!-- Racine du document -->
209 <xs:element name="block">
211 <xs:group ref="blockElmtGroup"/>