]> git.donarmstrong.com Git - flightcrew.git/blob - src/FlightCrew/Schemas/xlink.xsd
Imported Upstream version 0.7.2+dfsg
[flightcrew.git] / src / FlightCrew / Schemas / xlink.xsd
1 <?xml version='1.0' encoding='UTF-8'?>\r
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink">\r
3  \r
4  <xs:annotation>\r
5   <xs:documentation>This schema document provides attribute declarations and\r
6 attribute group, complex type and simple type definitions which can be used in\r
7 the construction of user schemas to define the structure of particular linking\r
8 constructs, e.g.\r
9 <![CDATA[\r
10 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"\r
11            xmlns:xl="http://www.w3.org/1999/xlink">\r
12 \r
13  <xs:import namespace="http://www.w3.org/1999/xlink"\r
14             location="http://www.w3.org/1999/xlink.xsd">\r
15 \r
16  <xs:element name="mySimple">\r
17   <xs:complexType>\r
18    ...\r
19    <xs:attributeGroup ref="xl:simpleAttrs"/>\r
20    ...\r
21   </xs:complexType>\r
22  </xs:element>\r
23  ...\r
24 </xs:schema>]]></xs:documentation>\r
25  </xs:annotation>\r
26 \r
27  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>\r
28 \r
29  <xs:attribute name="type" type="xlink:typeType"/>\r
30 \r
31  <xs:simpleType name="typeType">\r
32   <xs:restriction base="xs:token">\r
33    <xs:enumeration value="simple"/>\r
34    <xs:enumeration value="extended"/>\r
35    <xs:enumeration value="title"/>\r
36    <xs:enumeration value="resource"/>\r
37    <xs:enumeration value="locator"/>\r
38    <xs:enumeration value="arc"/>\r
39   </xs:restriction>\r
40  </xs:simpleType>\r
41 \r
42  <xs:attribute name="href" type="xlink:hrefType"/>\r
43 \r
44  <xs:simpleType name="hrefType">\r
45   <xs:restriction base="xs:anyURI"/>\r
46  </xs:simpleType>\r
47 \r
48  <xs:attribute name="role" type="xlink:roleType"/>\r
49 \r
50  <xs:simpleType name="roleType">\r
51   <xs:restriction base="xs:anyURI">\r
52    <xs:minLength value="1"/>\r
53   </xs:restriction>\r
54  </xs:simpleType>\r
55 \r
56  <xs:attribute name="arcrole" type="xlink:arcroleType"/>\r
57 \r
58  <xs:simpleType name="arcroleType">\r
59   <xs:restriction base="xs:anyURI">\r
60    <xs:minLength value="1"/>\r
61   </xs:restriction>\r
62  </xs:simpleType>\r
63 \r
64  <xs:attribute name="title" type="xlink:titleAttrType"/>\r
65 \r
66  <xs:simpleType name="titleAttrType">\r
67   <xs:restriction base="xs:string"/>\r
68  </xs:simpleType>\r
69 \r
70  <xs:attribute name="show" type="xlink:showType"/>\r
71 \r
72  <xs:simpleType name="showType">\r
73   <xs:restriction base="xs:token">\r
74    <xs:enumeration value="new"/>\r
75    <xs:enumeration value="replace"/>\r
76    <xs:enumeration value="embed"/>\r
77    <xs:enumeration value="other"/>\r
78    <xs:enumeration value="none"/>\r
79   </xs:restriction>\r
80  </xs:simpleType>\r
81 \r
82  <xs:attribute name="actuate" type="xlink:actuateType"/>\r
83 \r
84  <xs:simpleType name="actuateType">\r
85   <xs:restriction base="xs:token">\r
86    <xs:enumeration value="onLoad"/>\r
87    <xs:enumeration value="onRequest"/>\r
88    <xs:enumeration value="other"/>\r
89    <xs:enumeration value="none"/>\r
90   </xs:restriction>\r
91  </xs:simpleType>\r
92 \r
93  <xs:attribute name="label" type="xlink:labelType"/>\r
94 \r
95  <xs:simpleType name="labelType">\r
96   <xs:restriction base="xs:NCName"/>\r
97  </xs:simpleType>\r
98 \r
99  <xs:attribute name="from" type="xlink:fromType"/>\r
100 \r
101  <xs:simpleType name="fromType">\r
102   <xs:restriction base="xs:NCName"/>\r
103  </xs:simpleType>\r
104 \r
105  <xs:attribute name="to" type="xlink:toType"/>\r
106 \r
107  <xs:simpleType name="toType">\r
108   <xs:restriction base="xs:NCName"/>\r
109  </xs:simpleType>\r
110 \r
111  <xs:attributeGroup name="simpleAttrs">\r
112   <xs:attribute ref="xlink:type" fixed="simple"/>\r
113   <xs:attribute ref="xlink:href"/>\r
114   <xs:attribute ref="xlink:role"/>\r
115   <xs:attribute ref="xlink:arcrole"/>\r
116   <xs:attribute ref="xlink:title"/>\r
117   <xs:attribute ref="xlink:show"/>\r
118   <xs:attribute ref="xlink:actuate"/>\r
119  </xs:attributeGroup>\r
120 \r
121  <xs:group name="simpleModel">\r
122   <xs:sequence>\r
123    <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
124   </xs:sequence>\r
125  </xs:group>\r
126 \r
127  <xs:complexType mixed="true" name="simple">\r
128   <xs:annotation>\r
129    <xs:documentation>\r
130     Intended for use as the type of user-declared elements to make them\r
131     simple links.\r
132    </xs:documentation>\r
133   </xs:annotation>\r
134   <xs:group ref="xlink:simpleModel"/>\r
135   <xs:attributeGroup ref="xlink:simpleAttrs"/>\r
136  </xs:complexType>\r
137 \r
138  <xs:attributeGroup name="extendedAttrs">\r
139   <xs:attribute ref="xlink:type" fixed="extended" use="required"/>\r
140   <xs:attribute ref="xlink:role"/>\r
141   <xs:attribute ref="xlink:title"/>\r
142  </xs:attributeGroup>\r
143 \r
144  <xs:group name="extendedModel">\r
145    <xs:choice>\r
146     <xs:element ref="xlink:title"/>\r
147     <xs:element ref="xlink:resource"/>\r
148     <xs:element ref="xlink:locator"/>\r
149     <xs:element ref="xlink:arc"/>\r
150   </xs:choice>\r
151  </xs:group>\r
152 \r
153  <xs:complexType name="extended">\r
154   <xs:annotation>\r
155    <xs:documentation>\r
156     Intended for use as the type of user-declared elements to make them\r
157     extended links.\r
158     Note that the elements referenced in the content model are all abstract.\r
159     The intention is that by simply declaring elements with these as their\r
160     substitutionGroup, all the right things will happen.\r
161    </xs:documentation>\r
162   </xs:annotation>\r
163   <xs:group ref="xlink:extendedModel" minOccurs="0" maxOccurs="unbounded"/>\r
164   <xs:attributeGroup ref="xlink:extendedAttrs"/>\r
165  </xs:complexType>\r
166 \r
167  <xs:element name="title" type="xlink:titleEltType" abstract="true"/>\r
168 \r
169  <xs:attributeGroup name="titleAttrs">\r
170   <xs:attribute ref="xlink:type" fixed="title" use="required"/>\r
171   <xs:attribute ref="xml:lang">\r
172    <xs:annotation>\r
173     <xs:documentation>\r
174      xml:lang is not required, but provides much of the\r
175      motivation for title elements in addition to attributes, and so\r
176      is provided here for convenience.\r
177     </xs:documentation>\r
178    </xs:annotation>\r
179   </xs:attribute>\r
180  </xs:attributeGroup>\r
181 \r
182  <xs:group name="titleModel">\r
183   <xs:sequence>\r
184    <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
185   </xs:sequence>\r
186  </xs:group>\r
187 \r
188  <xs:complexType mixed="true" name="titleEltType">\r
189   <xs:group ref="xlink:titleModel"/>\r
190   <xs:attributeGroup ref="xlink:titleAttrs"/>\r
191  </xs:complexType>\r
192 \r
193  <xs:element name="resource" type="xlink:resourceType" abstract="true"/>\r
194 \r
195  <xs:attributeGroup name="resourceAttrs">\r
196   <xs:attribute ref="xlink:type" fixed="resource" use="required"/>\r
197   <xs:attribute ref="xlink:role"/>\r
198   <xs:attribute ref="xlink:title"/>\r
199   <xs:attribute ref="xlink:label"/>\r
200  </xs:attributeGroup>\r
201 \r
202  <xs:group name="resourceModel">\r
203   <xs:sequence>\r
204    <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
205   </xs:sequence>\r
206  </xs:group>\r
207 \r
208  <xs:complexType mixed="true" name="resourceType">\r
209   <xs:group ref="xlink:resourceModel"/>\r
210   <xs:attributeGroup ref="xlink:resourceAttrs"/>\r
211  </xs:complexType>\r
212 \r
213  <xs:element name="locator" type="xlink:locatorType" abstract="true"/>\r
214 \r
215  <xs:attributeGroup name="locatorAttrs">\r
216   <xs:attribute ref="xlink:type" fixed="locator" use="required"/>\r
217   <xs:attribute ref="xlink:href" use="required"/>\r
218   <xs:attribute ref="xlink:role"/>\r
219   <xs:attribute ref="xlink:title"/>\r
220   <xs:attribute ref="xlink:label">\r
221    <xs:annotation>\r
222     <xs:documentation>\r
223      label is not required, but locators have no particular\r
224      XLink function if they are not labeled.\r
225     </xs:documentation>\r
226    </xs:annotation>\r
227   </xs:attribute>\r
228  </xs:attributeGroup>\r
229 \r
230  <xs:group name="locatorModel">\r
231   <xs:sequence>\r
232    <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>\r
233   </xs:sequence>\r
234  </xs:group>\r
235 \r
236  <xs:complexType name="locatorType">\r
237   <xs:group ref="xlink:locatorModel"/>\r
238   <xs:attributeGroup ref="xlink:locatorAttrs"/>\r
239  </xs:complexType>\r
240 \r
241  <xs:element name="arc" type="xlink:arcType" abstract="true"/>\r
242 \r
243  <xs:attributeGroup name="arcAttrs">\r
244   <xs:attribute ref="xlink:type" fixed="arc" use="required"/>\r
245   <xs:attribute ref="xlink:arcrole"/>\r
246   <xs:attribute ref="xlink:title"/>\r
247   <xs:attribute ref="xlink:show"/>\r
248   <xs:attribute ref="xlink:actuate"/>\r
249   <xs:attribute ref="xlink:from"/>\r
250   <xs:attribute ref="xlink:to">\r
251    <xs:annotation>\r
252     <xs:documentation>\r
253      from and to have default behavior when values are missing\r
254     </xs:documentation>\r
255    </xs:annotation>\r
256   </xs:attribute>\r
257  </xs:attributeGroup>\r
258 \r
259  <xs:group name="arcModel">\r
260   <xs:sequence>\r
261    <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>\r
262   </xs:sequence>\r
263  </xs:group>\r
264 \r
265  <xs:complexType name="arcType">\r
266   <xs:group ref="xlink:arcModel"/>\r
267   <xs:attributeGroup ref="xlink:arcAttrs"/>\r
268  </xs:complexType>\r
269 \r
270 </xs:schema>\r