forked from javaee/jaxb-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindingschema.xsd
471 lines (441 loc) · 19 KB
/
bindingschema.xsd
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<?xml version = "1.0" encoding = "UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2009-2017 Oracle and/or its affiliates. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://oss.oracle.com/licenses/CDDL+GPL-1.1
or LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at LICENSE.txt.
GPL Classpath Exception:
Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the GPL Version 2 section of the License
file that accompanied this code.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->
<xs:schema
targetNamespace = "http://java.sun.com/xml/ns/jaxb"
xmlns:jaxb = "http://java.sun.com/xml/ns/jaxb"
xmlns:xs = "http://www.w3.org/2001/XMLSchema"
elementFormDefault = "qualified"
attributeFormDefault = "unqualified">
<xs:annotation>
<xs:documentation>Schema for binding schema. JAXB Version 1.0</xs:documentation>
</xs:annotation>
<xs:group name = "declaration">
<xs:annotation>
<xs:documentation>
Model group that represents a binding declaration.
Each new binding declaration added to the jaxb namespace
that is not restricted to globalBindings should
be added as a child element to this model group.
</xs:documentation>
<xs:documentation>
Allow for extension binding declarations.
</xs:documentation>
</xs:annotation>
<!-- each new binding declaration, not restricted to
globalBindings, should be added here -->
<xs:choice>
<xs:element ref = "jaxb:globalBindings"/>
<xs:element ref = "jaxb:schemaBindings"/>
<xs:element ref = "jaxb:class"/>
<xs:element ref = "jaxb:property"/>
<xs:element ref = "jaxb:typesafeEnumClass"/>
<xs:element ref = "jaxb:typesafeEnumMember"/>
<xs:element ref = "jaxb:javaType"/>
<xs:element ref = "jaxb:inlineBinaryData"/>
<xs:element ref = "jaxb:factoryMethod"/>
<xs:any namespace = "##other" processContents = "lax"/>
</xs:choice>
</xs:group>
<xs:attribute name = "version" type="xs:token" >
<xs:annotation><xs:documentation>
Used to specify the version of the binding schema on the
schema element for inline annotations or jaxb:bindings
for external binding.
</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attributeGroup name = "propertyAttributes">
<xs:annotation>
<xs:documentation>Attributes used for property customization. The attribute group
can be referenced either from the globalBindings declaration or from the
property declaration.
The following defaults are defined by the JAXB specification in global
scope only. Thus they apply when the propertyAttributes group is referenced
from the globalBindings declaration but not when referenced from the
property declaration.
collectionType a class that implements java.util.List, or 'indexed'
fixedAttributeAsConstantProperty false
enableFailFastCheck false
generateIsSetMethod false
</xs:documentation>
</xs:annotation>
<xs:attribute name = "collectionType" type="jaxb:referenceCollectionType"/>
<xs:attribute name = "fixedAttributeAsConstantProperty" type = "xs:boolean"/>
<xs:attribute name = "enableFailFastCheck" type = "xs:boolean"/>
<xs:attribute name = "generateIsSetMethod" type = "xs:boolean"/>
</xs:attributeGroup>
<xs:attributeGroup name = "XMLNameToJavaIdMappingDefaults">
<xs:annotation>
<xs:documentation>Customize XMlNames to Java id mapping </xs:documentation>
</xs:annotation>
<xs:attribute name = "underscoreBinding" default = "asWordSeparator" type = "jaxb:underscoreBindingType"/>
<xs:attribute name = "typesafeEnumMemberName" default = "generateError" type = "jaxb:typesafeEnumMemberNameType"/>
</xs:attributeGroup>
<xs:attributeGroup name = "typesafeEnumClassDefaults">
<xs:attribute name = "typesafeEnumBase" default = "xs:NCname" type = "jaxb:typesafeEnumBaseType"/>
</xs:attributeGroup>
<xs:element name = "globalBindings">
<xs:annotation>
<xs:documentation>Customization values defined in global scope.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs = "0">
<xs:element ref = "jaxb:javaType" minOccurs = "0" maxOccurs = "unbounded"/>
<xs:any namespace = "##other" processContents = "lax" maxOccurs = "unbounded">
<xs:annotation> <xs:documentation>
allows extension binding declarations to be specified.
</xs:documentation></xs:annotation>
</xs:any>
</xs:sequence>
<xs:attributeGroup ref = "jaxb:XMLNameToJavaIdMappingDefaults"/>
<xs:attributeGroup ref = "jaxb:typesafeEnumClassDefaults"/>
<xs:attributeGroup ref = "jaxb:propertyAttributes"/>
<xs:attribute name = "enableJavaNamingConventions" default = "true" type = "xs:boolean"/>
<xs:attribute name = "bindingStyle" default = "elementBinding" type = "jaxb:bindingStyleType"/>
<xs:attribute name = "choiceContentProperty" default = "false" type = "xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element name = "schemaBindings">
<xs:annotation>
<xs:documentation>Customization values with schema scope</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name = "package" type = "jaxb:packageType" minOccurs = "0"/>
<xs:element name = "nameXmlTransform" type = "jaxb:nameXmlTransformType" minOccurs = "0"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name = "class">
<xs:annotation>
<xs:documentation>Customize interface and implementation class.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
</xs:sequence>
<xs:attribute name = "name" type = "jaxb:javaIdentifierType">
<xs:annotation>
<xs:documentation>Java class name without package prefix.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name = "implClass" type = "jaxb:javaIdentifierType">
<xs:annotation>
<xs:documentation>Implementation class name including package prefix. </xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name = "property">
<xs:annotation>
<xs:documentation>Customize property.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name = "javadoc" type = "xs:string" minOccurs="0"/>
<xs:element name = "baseType" type="jaxb:propertyBaseType" minOccurs="0"/>
</xs:all>
<xs:attribute name = "name" type = "jaxb:javaIdentifierType"/>
<xs:attributeGroup ref = "jaxb:propertyAttributes"/>
</xs:complexType>
</xs:element>
<xs:element name = "javaType">
<xs:annotation>
<xs:documentation>Data type conversions; overriding builtins</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name = "name" use = "required" type = "jaxb:javaIdentifierType">
<xs:annotation>
<xs:documentation>name of the java type to which xml type is to be bound.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name = "xmlType" type = "xs:QName">
<xs:annotation>
<xs:documentation>
xml type to which java datatype has to be bound.
Must be present when javaType is scoped to globalBindings
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name = "parseMethod" type = "jaxb:javaIdentifierType"/>
<xs:attribute name = "printMethod" type = "jaxb:javaIdentifierType"/>
<xs:attribute name = "hasNsContext" default = "false" type = "xs:boolean" >
<xs:annotation>
<xs:documentation>
If true, the parsMethod and printMethod must reference a method
signtature that has a second parameter of type NamespaceContext.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name = "typesafeEnumClass">
<xs:annotation>
<xs:documentation>Bind to a type safe enumeration class.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
<xs:element ref = "jaxb:typesafeEnumMember" minOccurs = "0" maxOccurs = "unbounded"/>
</xs:sequence>
<xs:attribute name = "name" type = "jaxb:javaIdentifierType"/>
</xs:complexType>
</xs:element>
<xs:element name = "typesafeEnumMember">
<xs:annotation>
<xs:documentation> Enumeration member name in a type safe enumeration class.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
</xs:sequence>
<xs:attribute name = "value" type="xs:anySimpleType"/>
<xs:attribute name = "name" use = "required" type = "jaxb:javaIdentifierType"/>
</xs:complexType>
</xs:element>
<xs:element name="inlineBinaryData">
<xs:annotation><xs:documentation><![CDATA[
Disable binary optimization.
Used on elements like <xs:element name="foo" type="xs:base64Binary"/> to indicate
that this base64 binary data is always inlined and never subjected to the binary
transfer optimization (such as XOP/MTOM)
]]></xs:documentation></xs:annotation>
<xs:complexType />
</xs:element>
<xs:element name="factoryMethod">
<xs:annotation><xs:documentation><![CDATA[
Controls the name of the factory method on ObjectFactory.
]]></xs:documentation></xs:annotation>
<xs:complexType>
<xs:sequence />
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<!-- TYPE DEFINITIONS -->
<xs:complexType name = "propertyBaseType">
<xs:annotation>
<xs:documentation>
Customize the base type of a property. For V1.0, only
javaType is allowed for customization of simple types
at point of reference to a simple type.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element ref = "jaxb:javaType" minOccurs = "0"/>
</xs:all>
</xs:complexType>
<xs:simpleType name = "bindingStyleType">
<xs:annotation>
<xs:documentation>Allows selection of a binding algorithm</xs:documentation>
</xs:annotation>
<xs:restriction base = "xs:string">
<xs:enumeration value = "elementBinding"/>
<xs:enumeration value = "modelGroupBinding"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name = "packageType">
<xs:sequence>
<xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
</xs:sequence>
<xs:attribute name = "name" type = "jaxb:javaIdentifierType"/>
</xs:complexType>
<xs:simpleType name = "underscoreBindingType">
<xs:annotation>
<xs:documentation>Treate underscore in XML Name to Java identifier mapping. </xs:documentation>
</xs:annotation>
<xs:restriction base = "xs:string">
<xs:enumeration value = "asWordSeparator"/>
<xs:enumeration value = "asCharInWord"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name = "typesafeEnumBaseType">
<xs:annotation>
<xs:documentation>
XML types or types derived from them which have enumeration facet(s) which
are be mapped to typesafeEnumClass by default.
The following types cannot be specified in this list:
"xsd:QName", "xsd:base64Binary", "xsd:hexBinary",
"xsd:date", "xsd:time", "xsd:dateTime", "xsd:duration",
"xsd:gDay", "xsd:gMonth", "xsd:Year", "xsd:gMonthDay", "xsd:YearMonth"
</xs:documentation>
</xs:annotation>
<xs:list itemType = "xs:QName"/>
</xs:simpleType>
<xs:simpleType name = "typesafeEnumMemberNameType">
<xs:annotation>
<xs:documentation>
Used to customize how to handle name collisions.
i. generate VALUE_1, VALUE_2... if generateName.
ii. generate an error if value is generateError. This is JAXB default behavior.
</xs:documentation>
</xs:annotation>
<xs:restriction base = "xs:string">
<xs:enumeration value = "generateName"/>
<xs:enumeration value = "generateError"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name = "javaIdentifierType">
<xs:annotation>
<xs:documentation>Placeholder type to indicate Legal Java identifier.</xs:documentation>
</xs:annotation>
<xs:list itemType = "xs:NCName"/>
</xs:simpleType>
<xs:complexType name = "nameXmlTransformRule">
<xs:annotation>
<xs:documentation>Rule to transform an Xml name into another Xml name</xs:documentation>
</xs:annotation>
<xs:attribute name = "prefix" type = "xs:string">
<xs:annotation>
<xs:documentation>prepend the string to QName.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name = "suffix" type = "xs:string">
<xs:annotation>
<xs:documentation>Append the string to QName.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name = "nameXmlTransformType">
<xs:annotation>
<xs:documentation>
Allows transforming an xml name into another xml name. Use case UDDI 2.0 schema.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element name = "typeName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
<xs:annotation>
<xs:documentation>Mapping rule for type definitions.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name = "elementName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
<xs:annotation>
<xs:documentation>Mapping rule for elements</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name = "modelGroupName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
<xs:annotation>
<xs:documentation>Mapping rule for model group</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name = "anonymousTypeName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
<xs:annotation>
<xs:documentation>Mapping rule for class names generated for an anonymous type.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:attribute name = "extensionBindingPrefixes">
<xs:annotation>
<xs:documentation>
A binding compiler only processes this attribute when it occurs on an
an instance of xs:schema element. The value of this attribute is a
whitespace-separated list of namespace prefixes. The namespace bound
to each of the prefixes is designated as a customization declaration
namespace.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:list itemType = "xs:normalizedString"/>
</xs:simpleType>
</xs:attribute>
<xs:element name = "bindings">
<xs:annotation>
<xs:documentation>
Binding declaration(s) for a remote schema.
If attribute node is set, the binding declaraions
are associated with part of the remote schema
designated by schemaLocation attribute. The node
attribute identifies the node in the remote schema
to associate the binding declaration(s) with.
</xs:documentation>
</xs:annotation>
<!-- a <bindings> element can contain arbitrary number of binding declarations or nested <bindings> elements -->
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs = "0" maxOccurs = "unbounded">
<xs:group ref = "jaxb:declaration"/>
<xs:element ref = "jaxb:bindings"/>
</xs:choice>
</xs:sequence>
<xs:attribute name = "schemaLocation" type = "xs:anyURI">
<xs:annotation>
<xs:documentation>
Location of the remote schema to associate binding declarations with.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name = "node" type = "xs:string">
<xs:annotation>
<xs:documentation>
The value of the string is an XPATH 1.0 compliant string that
resolves to a node in a remote schema to associate
binding declarations with. The remote schema is specified
by the schemaLocation attribute occuring in the current
element or in a parent of this element.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name = "version" type = "xs:token">
<xs:annotation>
<xs:documentation>
Used to indicate the version of binding declarations.
Only valid on root level bindings element.
Either this or "jaxb:version" attribute but not both may be specified.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute ref = "jaxb:version">
<xs:annotation>
<xs:documentation>
Used to indicate the version of binding declarations.
Only valid on root level bindings element.
Either this attribute or "version" attribute but not both may be specified.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:simpleType name="referenceCollectionType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="indexed"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="jaxb:javaIdentifierType"/>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:schema>