~zorba-coders/zorba/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://www.w3.org/2010/xslt-xquery-serialization"
      xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"
      elementFormDefault="qualified">

  <xs:annotation>
    <xs:documentation>
      This is a schema for serialization parameters for
      XSLT and XQuery Serialization 3.0.

      This schema is available for use under the conditions of the
      W3C Software License published at
      http://www.w3.org/Consortium/Legal/copyright-software-19980720

      It defines a schema for XML Infoset instances with which a user of
      a host language MAY specify serialization parameters for use in
      serializing an instance of the XQuery and XPath Data Model.  It
      also provides hooks that allow the inclusion of implementation-
      defined serialization parameters and implementation-defined
      modifiers to serialization parameters.
    </xs:documentation>
  </xs:annotation>

  <xs:simpleType name="QNames-type">
    <xs:list itemType="xs:QName"/>
  </xs:simpleType>

  <xs:simpleType name="yes-no-type">
    <xs:restriction base="xs:token">
      <xs:enumeration value="no"/>
      <xs:enumeration value="yes"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="yes-no-omit-type">
    <xs:restriction base="xs:token">
      <xs:enumeration value="no"/>
      <xs:enumeration value="omit"/>
      <xs:enumeration value="yes"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="char-type">
    <xs:restriction base="xs:string">
      <xs:maxLength value="1"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="encoding-string-type">
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Za-z]([A-Za-z0-9._]|-)*"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="method-type">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="html"/>
          <xs:enumeration value="text"/>
          <xs:enumeration value="xml"/>
          <xs:enumeration value="xhtml"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:QName">
          <xs:pattern value=".*:.*"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <xs:simpleType name="pubid-char-string-type">
    <xs:restriction base="xs:string">
      <xs:pattern value="([- \r\n\ta-zA-Z0-9'()+,./:=?;!*#@$_%])*"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="system-id-string-type">
    <xs:restriction base="xs:string">
      <xs:pattern value="[^']*|[^&quot;]*"/>
    </xs:restriction>
  </xs:simpleType>

  <!--
     - Base type of all serialization parameter types
    -->
  <xs:complexType name="base-param-type">
    <xs:complexContent>
      <xs:restriction base="xs:anyType">
        <xs:anyAttribute namespace="##other" processContents="lax"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Generic string serialization parameters
    -->
  <xs:complexType name="string-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="xs:string" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter type for "yes", "no" or "omit"
     - serialization parameters
    -->
  <xs:complexType name="yes-no-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:yes-no-type" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter type for list of xs:QName
     - serialization parameters
    -->
  <xs:complexType name="QNames-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:QNames-type" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter type for "yes", "no" or "omit"
     - serialization parameters
    -->
  <xs:complexType name="yes-no-omit-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:yes-no-omit-type"
              use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter element for byte-order-mark parameter
    -->
  <xs:element name="serialization-parameter-element"
        abstract="true"
        type="output:base-param-type"/>

  <!--
     - Serialization parameter element for byte-order-mark parameter
    -->
  <xs:element id="byte-order-mark" name="byte-order-mark" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for cdata-section-elements parameter
    -->
  <xs:element id="cdata-section-elements" name="cdata-section-elements" type="output:QNames-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter type for doctype-public parameter
    -->
  <xs:complexType name="doctype-public-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:pubid-char-string-type"
              use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter element for doctype-public parameter
    -->
  <xs:element id="doctype-public" name="doctype-public" type="output:doctype-public-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter type for doctype-system parameter
    -->
  <xs:complexType name="doctype-system-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:system-id-string-type"
              use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter element for doctype-system parameter
    -->
  <xs:element id="doctype-system" name="doctype-system" type="output:doctype-system-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter type for encoding parameter
    -->
  <xs:complexType name="encoding-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:encoding-string-type"
              use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter element for method parameter
    -->
  <xs:element id="encoding" name="encoding" type="output:encoding-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for escape-uri-attributes parameter
    -->
  <xs:element id="escape-uri-attributes" name="escape-uri-attributes" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for include-content-type parameter
    -->
  <xs:element id="include-content-type" name="include-content-type" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for indent parameter
    -->
  <xs:element id="indent" name="indent" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for media-type parameter
    -->
  <xs:element id="media-type" name="media-type" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter type for method parameter
    -->
  <xs:complexType name="method-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:attribute name="value" type="output:method-type"
                use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter element for method parameter
    -->
  <xs:element id="method" name="method" type="output:method-param-type"
        substitutionGroup="output:serialization-parameter-element"/>
  <!--
     - Serialization parameter element for normalization-form parameter
    -->
  <xs:element id="normalization-form" name="normalization-form" type="output:string-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for omit-xml-declaration parameter
    -->
  <xs:element id="omit-xml-declaration" name="omit-xml-declaration" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for standalone parameter
    -->
  <xs:element id="standalone" name="standalone" type="output:yes-no-omit-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for suppress-indentation parameter
    -->
  <xs:element id="suppress-indentation" name="suppress-indentation" type="output:QNames-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for undeclare-prefixes parameter
    -->
  <xs:element id="undeclare-prefixes" name="undeclare-prefixes" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter type for use-character-maps
     - parameter
    -->
  <xs:complexType name="use-character-maps-param-type">
    <xs:complexContent>
      <xs:extension base="output:base-param-type">
        <xs:sequence>
          <xs:element name="character-map" minOccurs="0"
                  maxOccurs="unbounded">
            <xs:complexType>
              <xs:attribute name="character" type="output:char-type"/>
              <xs:attribute name="map-string" type="xs:string"/>
              <xs:anyAttribute namespace="##other"
                     processContents="lax"/>
            </xs:complexType>
          </xs:element>
          <xs:any minOccurs="0" namespace="##other"
                     processContents="lax"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
     - Serialization parameter element for use-character-maps parameter
    -->
  <xs:element id="use-character-maps" name="use-character-maps"
        type="output:use-character-maps-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <!--
     - Serialization parameter element for version parameter
    -->
  <xs:element id="version" name="version"
        type="output:string-param-type"
        substitutionGroup="output:serialization-parameter-element"/>

  <xs:element name="serialization-parameters">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="output:serialization-parameter-element"
              minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>