]> AND Private Git Repository - blast.git/blob - blastconfig.xsd
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
added impl xsd + patterns in impls
[blast.git] / blastconfig.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
4
5     <!-- déclaration des groupes d'attributs -->
6
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"/>
11     </xs:attributeGroup>
12
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" />
18     </xs:attributeGroup>
19
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" /> 
26     </xs:attributeGroup>
27
28
29     <!-- déclaration des attributs -->
30
31     <xs:attribute name="nb">
32         <xs:simpleType>
33             <xs:restriction base="xs:nonNegativeInteger">
34                 <xs:minInclusive value="1"/>
35             </xs:restriction>
36         </xs:simpleType>
37     </xs:attribute>
38
39     <xs:attribute name="name" type="xs:string"/>
40
41     <xs:attribute name="id">
42         <xs:simpleType>
43             <xs:restriction base="xs:nonNegativeInteger">
44                 <xs:minInclusive value="0"/>
45             </xs:restriction>
46         </xs:simpleType>
47     </xs:attribute>
48
49     <xs:attribute name="parent">
50         <xs:simpleType>
51             <xs:restriction base="xs:integer">
52                 <xs:minInclusive value="-1"/>
53             </xs:restriction>
54         </xs:simpleType>
55     </xs:attribute>
56
57     <xs:attribute name="path" type="xs:string"/>
58
59     <xs:attribute name="lib_file" type="xs:string"/>
60
61     <xs:attribute name="width">
62         <xs:simpleType>
63             <xs:restriction base="xs:nonNegativeInteger">
64                 <xs:minInclusive value="1"/>
65                 <xs:maxInclusive value="1000"/>
66             </xs:restriction>
67         </xs:simpleType>
68     </xs:attribute>
69
70     <xs:attribute name="height">
71         <xs:simpleType>
72             <xs:restriction base="xs:nonNegativeInteger">
73                 <xs:minInclusive value="1"/>
74                 <xs:maxInclusive value="1000"/>
75             </xs:restriction>
76         </xs:simpleType>
77     </xs:attribute>
78
79     <xs:attribute name="font" type="xs:string"/>
80
81     <xs:attribute name="font_size">
82         <xs:simpleType>
83             <xs:restriction base="xs:nonNegativeInteger">
84                 <xs:minInclusive value="1"/>
85             </xs:restriction>
86         </xs:simpleType>
87     </xs:attribute>
88
89     <xs:attribute name="linelength">
90         <xs:simpleType>
91             <xs:restriction base="xs:nonNegativeInteger">
92                 <xs:minInclusive value="1"/>
93                 <xs:maxInclusive value="100"/>
94             </xs:restriction>
95         </xs:simpleType>
96     </xs:attribute>
97
98     <xs:attribute name="gaplength">
99         <xs:simpleType>
100             <xs:restriction base="xs:nonNegativeInteger">
101                 <xs:minInclusive value="1"/>
102                 <xs:maxInclusive value="100"/>
103             </xs:restriction>
104         </xs:simpleType>
105     </xs:attribute>
106
107
108     <!-- déclaration des groupes d'éléments -->
109
110     <xs:group name="configElmtGroup">
111         <xs:sequence>
112             <xs:element ref="categories"/>
113             <xs:element ref="references"/>
114             <xs:element ref="implementations"/>
115             <xs:element ref="defaults" />
116         </xs:sequence>
117     </xs:group>
118
119     <xs:group name="defaultsElmtGroup">
120         <xs:sequence>
121             <xs:element ref="blocks"/>
122             <xs:element ref="interfaces"/>
123             <xs:element ref="connections" />
124         </xs:sequence>
125     </xs:group>
126
127
128     <!-- déclaration des éléments -->
129
130     <xs:element name="category">
131         <xs:complexType>
132             <xs:attributeGroup ref="categoryAttrGroup" />
133         </xs:complexType>
134     </xs:element>
135
136     <xs:element name="reference_lib">
137         <xs:complexType>
138             <xs:attribute ref="path" use="required"/>
139         </xs:complexType>
140     </xs:element>
141
142     <xs:element name="impl_lib">
143       <xs:complexType>
144         <xs:attribute ref="path" use="required"/>
145       </xs:complexType>
146     </xs:element>
147
148     <xs:element name="blocks">
149         <xs:complexType>
150             <xs:attributeGroup ref="blocksAttrGroup" />
151         </xs:complexType>
152     </xs:element>
153
154     <xs:element name="interfaces">
155         <xs:complexType>
156             <xs:attributeGroup ref="interfacesAttrGroup" />
157         </xs:complexType>
158     </xs:element>
159
160     <xs:element name="connections">
161         <xs:complexType>
162             <xs:attribute ref="gaplength" use="required"/>
163         </xs:complexType>
164     </xs:element>
165
166     <xs:element name="categories">
167         <xs:complexType>
168             <xs:sequence>
169                 <xs:element ref="category" maxOccurs="unbounded" />
170             </xs:sequence>
171             <xs:attribute ref="nb" use="required"/>
172         </xs:complexType>
173     </xs:element>
174
175     <xs:element name="references">
176         <xs:complexType >
177             <xs:sequence>
178                 <xs:element ref="reference_lib" maxOccurs="unbounded" />
179             </xs:sequence>
180             <xs:attribute ref="nb" use="required"/>
181             <xs:attribute ref="lib_file" use="required"/>
182         </xs:complexType>
183     </xs:element>
184
185     <xs:element name="implementations">
186         <xs:complexType >
187             <xs:sequence>
188                 <xs:element ref="impl_lib" maxOccurs="unbounded" />
189             </xs:sequence>
190             <xs:attribute ref="nb" use="required"/>
191             <xs:attribute ref="lib_file" use="required"/>
192         </xs:complexType>
193     </xs:element>
194
195     <xs:element name="defaults">
196         <xs:complexType>
197             <xs:group ref="defaultsElmtGroup" />
198         </xs:complexType>       
199     </xs:element>
200
201
202     <!-- Racine du document -->
203
204     <xs:element name="config">
205         <xs:complexType>
206             <xs:group ref="configElmtGroup" />
207         </xs:complexType>       
208     </xs:element>
209
210 </xs:schema>