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"/>
22 <xs:attribute name="endian" type="typeendian" use="optional"/>
26 <!-- déclaration des attributs -->
28 <xs:attribute name="ids" type="xs:string"/>
29 <xs:attribute name="name" type="xs:string"/>
31 <xs:simpleType name="typeparam">
32 <xs:restriction base="xs:string">
33 <xs:enumeration value="string"/>
34 <xs:enumeration value="expression"/>
35 <xs:enumeration value="boolean"/>
36 <xs:enumeration value="integer"/>
37 <xs:enumeration value="natural"/>
38 <xs:enumeration value="positive"/>
39 <xs:enumeration value="real"/>
40 <xs:enumeration value="time"/>
44 <xs:simpleType name="typeiface">
45 <xs:restriction base="xs:string">
46 <xs:enumeration value="expression"/>
47 <xs:enumeration value="boolean"/>
48 <xs:enumeration value="natural"/>
52 <xs:simpleType name="typeendian">
53 <xs:restriction base="xs:string">
54 <xs:enumeration value="little"/>
55 <xs:enumeration value="big"/>
59 <xs:attribute name="wishbone" type="xs:string"/>
60 <xs:attribute name="context" type="xs:string" />
61 <xs:attribute name="multiplicity" type="xs:string" />
62 <xs:attribute name="width" type="xs:string"/>
63 <xs:attribute name="purpose" type="xs:string"/>
64 <xs:attribute name="value" type="xs:string"/>
65 <xs:attribute name="iface" type="xs:string"/>
66 <xs:attribute name="path" type="xs:string" />
69 <!-- déclaration des groupes d'éléments -->
71 <xs:group name="blockElmtGroup">
73 <xs:element ref="informations"/>
74 <xs:element ref="parameters"/>
75 <xs:element ref="interfaces"/>
76 <xs:element ref="implementations" minOccurs="0"/>
80 <xs:group name="informationsElmtGroup">
82 <xs:element ref="name"/>
83 <xs:element ref="category"/>
84 <xs:element ref="description"/>
88 <xs:group name="descriptionElmtGroup">
90 <xs:element ref="brief"/>
91 <xs:element ref="detailed"/>
95 <xs:group name="interfacesElmtGroup">
97 <xs:element ref="inputs" minOccurs="0"/>
98 <xs:element ref="outputs" minOccurs="1"/>
99 <xs:element ref="bidirs" minOccurs="0"/>
104 <!-- déclaration des éléments -->
106 <xs:element name="informations">
108 <xs:group ref="informationsElmtGroup"/>
112 <xs:element name="name" type="xs:string" />
114 <xs:element name="category">
116 <xs:attribute ref="ids" use="required"/>
120 <xs:element name="description">
122 <xs:group ref="descriptionElmtGroup"/>
126 <xs:element name="brief" type="xs:string" />
128 <xs:element name="detailed" type="xs:string" />
130 <xs:element name="parameters">
133 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
138 <xs:element name="parameter">
140 <xs:attributeGroup ref="parameterAttrGroup"/>
144 <xs:element name="interfaces">
146 <xs:group ref="interfacesElmtGroup"/>
150 <xs:element name="control">
152 <xs:attribute ref="iface"/>
156 <xs:element name="inputs">
159 <xs:element ref="input" maxOccurs="unbounded" />
160 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
165 <xs:element name="input">
167 <xs:attributeGroup ref="inOutAttrGroup"/>
171 <xs:element name="outputs">
174 <xs:element ref="output" maxOccurs="unbounded" />
175 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
180 <xs:element name="output">
182 <xs:attributeGroup ref="inOutAttrGroup"/>
186 <xs:element name="bidirs">
189 <xs:element ref="bidir" maxOccurs="unbounded" />
194 <xs:element name="bidir">
196 <xs:attributeGroup ref="inOutAttrGroup"/>
200 <xs:element name="implementations">
203 <xs:element ref="implementation" maxOccurs="unbounded" />
208 <xs:element name="implementation">
210 <xs:attribute ref="path" use="required" />
215 <!-- Racine du document -->
217 <xs:element name="block">
219 <xs:group ref="blockElmtGroup"/>
220 <xs:attribute name="version" type="xs:string" use="optional" />