Project

Profile

Help

How to connect?
Download (8.1 KB) Statistics
| Branch: | Tag: | Revision:

he / latest10 / hej / net / sf / saxon / data / w3c / xlink / xlink.xsd @ 02f8308b

1
<?xml version='1.0' encoding='UTF-8'?>
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">
3
 
4
 <xs:annotation>
5
  <xs:documentation>This schema document provides attribute declarations and
6
attribute group, complex type and simple type definitions which can be used in
7
the construction of user schemas to define the structure of particular linking
8
constructs, e.g.
9
<![CDATA[
10
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
11
           xmlns:xl="http://www.w3.org/1999/xlink">
12

    
13
 <xs:import namespace="http://www.w3.org/1999/xlink"
14
            location="http://www.w3.org/1999/xlink.xsd">
15

    
16
 <xs:element name="mySimple">
17
  <xs:complexType>
18
   ...
19
   <xs:attributeGroup ref="xl:simpleAttrs"/>
20
   ...
21
  </xs:complexType>
22
 </xs:element>
23
 ...
24
</xs:schema>]]></xs:documentation>
25
 </xs:annotation>
26

    
27
 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
28

    
29
 <xs:attribute name="type" type="xlink:typeType"/>
30

    
31
 <xs:simpleType name="typeType">
32
  <xs:restriction base="xs:token">
33
   <xs:enumeration value="simple"/>
34
   <xs:enumeration value="extended"/>
35
   <xs:enumeration value="title"/>
36
   <xs:enumeration value="resource"/>
37
   <xs:enumeration value="locator"/>
38
   <xs:enumeration value="arc"/>
39
  </xs:restriction>
40
 </xs:simpleType>
41

    
42
 <xs:attribute name="href" type="xlink:hrefType"/>
43

    
44
 <xs:simpleType name="hrefType">
45
  <xs:restriction base="xs:anyURI"/>
46
 </xs:simpleType>
47

    
48
 <xs:attribute name="role" type="xlink:roleType"/>
49

    
50
 <xs:simpleType name="roleType">
51
  <xs:restriction base="xs:anyURI">
52
   <xs:minLength value="1"/>
53
  </xs:restriction>
54
 </xs:simpleType>
55

    
56
 <xs:attribute name="arcrole" type="xlink:arcroleType"/>
57

    
58
 <xs:simpleType name="arcroleType">
59
  <xs:restriction base="xs:anyURI">
60
   <xs:minLength value="1"/>
61
  </xs:restriction>
62
 </xs:simpleType>
63

    
64
 <xs:attribute name="title" type="xlink:titleAttrType"/>
65

    
66
 <xs:simpleType name="titleAttrType">
67
  <xs:restriction base="xs:string"/>
68
 </xs:simpleType>
69

    
70
 <xs:attribute name="show" type="xlink:showType"/>
71

    
72
 <xs:simpleType name="showType">
73
  <xs:restriction base="xs:token">
74
   <xs:enumeration value="new"/>
75
   <xs:enumeration value="replace"/>
76
   <xs:enumeration value="embed"/>
77
   <xs:enumeration value="other"/>
78
   <xs:enumeration value="none"/>
79
  </xs:restriction>
80
 </xs:simpleType>
81

    
82
 <xs:attribute name="actuate" type="xlink:actuateType"/>
83

    
84
 <xs:simpleType name="actuateType">
85
  <xs:restriction base="xs:token">
86
   <xs:enumeration value="onLoad"/>
87
   <xs:enumeration value="onRequest"/>
88
   <xs:enumeration value="other"/>
89
   <xs:enumeration value="none"/>
90
  </xs:restriction>
91
 </xs:simpleType>
92

    
93
 <xs:attribute name="label" type="xlink:labelType"/>
94

    
95
 <xs:simpleType name="labelType">
96
  <xs:restriction base="xs:NCName"/>
97
 </xs:simpleType>
98

    
99
 <xs:attribute name="from" type="xlink:fromType"/>
100

    
101
 <xs:simpleType name="fromType">
102
  <xs:restriction base="xs:NCName"/>
103
 </xs:simpleType>
104

    
105
 <xs:attribute name="to" type="xlink:toType"/>
106

    
107
 <xs:simpleType name="toType">
108
  <xs:restriction base="xs:NCName"/>
109
 </xs:simpleType>
110

    
111
 <xs:attributeGroup name="simpleAttrs">
112
  <xs:attribute ref="xlink:type" fixed="simple"/>
113
  <xs:attribute ref="xlink:href"/>
114
  <xs:attribute ref="xlink:role"/>
115
  <xs:attribute ref="xlink:arcrole"/>
116
  <xs:attribute ref="xlink:title"/>
117
  <xs:attribute ref="xlink:show"/>
118
  <xs:attribute ref="xlink:actuate"/>
119
 </xs:attributeGroup>
120
 
121
 <!-- Added by Saxonica to prevent problems with real-world schemas that use this attribute group from a different version of XLink -->
122
 <xs:attributeGroup name="simpleLink">
123
  <xs:attributeGroup ref="xlink:simpleAttrs"/>
124
 </xs:attributeGroup>
125

    
126
 <xs:group name="simpleModel">
127
  <xs:sequence>
128
   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
129
  </xs:sequence>
130
 </xs:group>
131

    
132
 <xs:complexType mixed="true" name="simple">
133
  <xs:annotation>
134
   <xs:documentation>
135
    Intended for use as the type of user-declared elements to make them
136
    simple links.
137
   </xs:documentation>
138
  </xs:annotation>
139
  <xs:group ref="xlink:simpleModel"/>
140
  <xs:attributeGroup ref="xlink:simpleAttrs"/>
141
 </xs:complexType>
142

    
143
 <xs:attributeGroup name="extendedAttrs">
144
  <xs:attribute ref="xlink:type" fixed="extended" use="required"/>
145
  <xs:attribute ref="xlink:role"/>
146
  <xs:attribute ref="xlink:title"/>
147
 </xs:attributeGroup>
148

    
149
 <xs:group name="extendedModel">
150
   <xs:choice>
151
    <xs:element ref="xlink:title"/>
152
    <xs:element ref="xlink:resource"/>
153
    <xs:element ref="xlink:locator"/>
154
    <xs:element ref="xlink:arc"/>
155
  </xs:choice>
156
 </xs:group>
157

    
158
 <xs:complexType name="extended">
159
  <xs:annotation>
160
   <xs:documentation>
161
    Intended for use as the type of user-declared elements to make them
162
    extended links.
163
    Note that the elements referenced in the content model are all abstract.
164
    The intention is that by simply declaring elements with these as their
165
    substitutionGroup, all the right things will happen.
166
   </xs:documentation>
167
  </xs:annotation>
168
  <xs:group ref="xlink:extendedModel" minOccurs="0" maxOccurs="unbounded"/>
169
  <xs:attributeGroup ref="xlink:extendedAttrs"/>
170
 </xs:complexType>
171

    
172
 <xs:element name="title" type="xlink:titleEltType" abstract="true"/>
173

    
174
 <xs:attributeGroup name="titleAttrs">
175
  <xs:attribute ref="xlink:type" fixed="title" use="required"/>
176
  <xs:attribute ref="xml:lang">
177
   <xs:annotation>
178
    <xs:documentation>
179
     xml:lang is not required, but provides much of the
180
     motivation for title elements in addition to attributes, and so
181
     is provided here for convenience.
182
    </xs:documentation>
183
   </xs:annotation>
184
  </xs:attribute>
185
 </xs:attributeGroup>
186

    
187
 <xs:group name="titleModel">
188
  <xs:sequence>
189
   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
190
  </xs:sequence>
191
 </xs:group>
192

    
193
 <xs:complexType mixed="true" name="titleEltType">
194
  <xs:group ref="xlink:titleModel"/>
195
  <xs:attributeGroup ref="xlink:titleAttrs"/>
196
 </xs:complexType>
197

    
198
 <xs:element name="resource" type="xlink:resourceType" abstract="true"/>
199

    
200
 <xs:attributeGroup name="resourceAttrs">
201
  <xs:attribute ref="xlink:type" fixed="resource" use="required"/>
202
  <xs:attribute ref="xlink:role"/>
203
  <xs:attribute ref="xlink:title"/>
204
  <xs:attribute ref="xlink:label"/>
205
 </xs:attributeGroup>
206

    
207
 <xs:group name="resourceModel">
208
  <xs:sequence>
209
   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
210
  </xs:sequence>
211
 </xs:group>
212

    
213
 <xs:complexType mixed="true" name="resourceType">
214
  <xs:group ref="xlink:resourceModel"/>
215
  <xs:attributeGroup ref="xlink:resourceAttrs"/>
216
 </xs:complexType>
217

    
218
 <xs:element name="locator" type="xlink:locatorType" abstract="true"/>
219

    
220
 <xs:attributeGroup name="locatorAttrs">
221
  <xs:attribute ref="xlink:type" fixed="locator" use="required"/>
222
  <xs:attribute ref="xlink:href" use="required"/>
223
  <xs:attribute ref="xlink:role"/>
224
  <xs:attribute ref="xlink:title"/>
225
  <xs:attribute ref="xlink:label">
226
   <xs:annotation>
227
    <xs:documentation>
228
     label is not required, but locators have no particular
229
     XLink function if they are not labeled.
230
    </xs:documentation>
231
   </xs:annotation>
232
  </xs:attribute>
233
 </xs:attributeGroup>
234

    
235
 <xs:group name="locatorModel">
236
  <xs:sequence>
237
   <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
238
  </xs:sequence>
239
 </xs:group>
240

    
241
 <xs:complexType name="locatorType">
242
  <xs:group ref="xlink:locatorModel"/>
243
  <xs:attributeGroup ref="xlink:locatorAttrs"/>
244
 </xs:complexType>
245

    
246
 <xs:element name="arc" type="xlink:arcType" abstract="true"/>
247

    
248
 <xs:attributeGroup name="arcAttrs">
249
  <xs:attribute ref="xlink:type" fixed="arc" use="required"/>
250
  <xs:attribute ref="xlink:arcrole"/>
251
  <xs:attribute ref="xlink:title"/>
252
  <xs:attribute ref="xlink:show"/>
253
  <xs:attribute ref="xlink:actuate"/>
254
  <xs:attribute ref="xlink:from"/>
255
  <xs:attribute ref="xlink:to">
256
   <xs:annotation>
257
    <xs:documentation>
258
     from and to have default behavior when values are missing
259
    </xs:documentation>
260
   </xs:annotation>
261
  </xs:attribute>
262
 </xs:attributeGroup>
263

    
264
 <xs:group name="arcModel">
265
  <xs:sequence>
266
   <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
267
  </xs:sequence>
268
 </xs:group>
269

    
270
 <xs:complexType name="arcType">
271
  <xs:group ref="xlink:arcModel"/>
272
  <xs:attributeGroup ref="xlink:arcAttrs"/>
273
 </xs:complexType>
274

    
275
</xs:schema>
    (1-1/1)