1 <!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5 Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
7 Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8 Other names may be trademarks of their respective owners.
10 The contents of this file are subject to the terms of either the GNU
11 General Public License Version 2 only ("GPL") or the Common
12 Development and Distribution License("CDDL") (collectively, the
13 "License"). You may not use this file except in compliance with the
14 License. You can obtain a copy of the License at
15 http://www.netbeans.org/cddl-gplv2.html
16 or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17 specific language governing permissions and limitations under the
18 License. When distributing the software, include this License Header
19 Notice in each file and include the License file at
20 nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
21 particular file as subject to the "Classpath" exception as provided
22 by Oracle in the GPL Version 2 section of the License file that
23 accompanied this code. If applicable, add the following below the
24 License Header, with the fields enclosed by brackets [] replaced by
25 your own identifying information:
26 "Portions Copyrighted [year] [name of copyright owner]"
30 The Original Software is NetBeans. The Initial Developer of the Original
31 Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
32 Microsystems, Inc. All Rights Reserved.
34 If you wish your version of this file to be governed by only the CDDL
35 or only the GPL Version 2, indicate your decision by adding
36 "[Contributor] elects to include this software in this distribution
37 under the [CDDL or GPL Version 2] license." If you do not indicate a
38 single choice of license, a recipient has the option to distribute
39 your version of this file under either the CDDL, the GPL Version 2 or
40 to extend the choice of license to its licensees as provided above.
41 However, if you add GPL Version 2 code and therefore, elected the GPL
42 Version 2 license, then the option applies only if the new code is
43 made subject to such option by the copyright holder.
46 <!-- The bindingschema -->
47 <!ENTITY % bindingschema PUBLIC 'bindingschema' 'bindingschema_1_0.dtd' >
49 <!ENTITY % nds 'xmlns%s;'>
51 <!-- Define all the element names, with optional prefix -->
52 <!ENTITY % schema "%p;schema">
53 <!ENTITY % complexType "%p;complexType">
54 <!ENTITY % complexContent "%p;complexContent">
55 <!ENTITY % simpleContent "%p;simpleContent">
56 <!ENTITY % extension "%p;extension">
57 <!ENTITY % element "%p;element">
58 <!ENTITY % unique "%p;unique">
59 <!ENTITY % key "%p;key">
60 <!ENTITY % keyref "%p;keyref">
61 <!ENTITY % selector "%p;selector">
62 <!ENTITY % field "%p;field">
63 <!ENTITY % group "%p;group">
64 <!ENTITY % all "%p;all">
65 <!ENTITY % choice "%p;choice">
66 <!ENTITY % sequence "%p;sequence">
67 <!ENTITY % any "%p;any">
68 <!ENTITY % anyAttribute "%p;anyAttribute">
69 <!ENTITY % attribute "%p;attribute">
70 <!ENTITY % attributeGroup "%p;attributeGroup">
71 <!ENTITY % include "%p;include">
72 <!ENTITY % import "%p;import">
73 <!ENTITY % redefine "%p;redefine">
74 <!ENTITY % notation "%p;notation">
76 <!-- annotation elements -->
77 <!ENTITY % annotation "%p;annotation">
78 <!ENTITY % appinfo "%p;appinfo">
79 <!ENTITY % documentation "%p;documentation">
81 <!-- Customisation entities for the ATTLIST of each element type.
82 Define one of these if your schema takes advantage of the
83 anyAttribute='##other' in the schema for schemas -->
85 <!ENTITY % schemaAttrs ''>
86 <!ENTITY % complexTypeAttrs ''>
87 <!ENTITY % complexContentAttrs ''>
88 <!ENTITY % simpleContentAttrs ''>
89 <!ENTITY % extensionAttrs ''>
90 <!ENTITY % elementAttrs ''>
91 <!ENTITY % groupAttrs ''>
92 <!ENTITY % allAttrs ''>
93 <!ENTITY % choiceAttrs ''>
94 <!ENTITY % sequenceAttrs ''>
95 <!ENTITY % anyAttrs ''>
96 <!ENTITY % anyAttributeAttrs ''>
97 <!ENTITY % attributeAttrs ''>
98 <!ENTITY % attributeGroupAttrs ''>
99 <!ENTITY % uniqueAttrs ''>
100 <!ENTITY % keyAttrs ''>
101 <!ENTITY % keyrefAttrs ''>
102 <!ENTITY % selectorAttrs ''>
103 <!ENTITY % fieldAttrs ''>
104 <!ENTITY % includeAttrs ''>
105 <!ENTITY % importAttrs ''>
106 <!ENTITY % redefineAttrs ''>
107 <!ENTITY % notationAttrs ''>
108 <!ENTITY % annotationAttrs ''>
109 <!ENTITY % appinfoAttrs ''>
110 <!ENTITY % documentationAttrs ''>
112 <!ENTITY % complexDerivationSet "CDATA">
113 <!-- #all or space-separated list drawn from derivationChoice -->
114 <!ENTITY % blockSet "CDATA">
115 <!-- #all or space-separated list drawn from
116 derivationChoice + 'substitution' -->
118 <!ENTITY % mgs '%all; | %choice; | %sequence;'>
119 <!ENTITY % cs '%choice; | %sequence;'>
120 <!ENTITY % formValues '(qualified|unqualified)'>
123 <!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
125 <!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
127 <!-- This is used in part2 -->
128 <!ENTITY % restriction1 '((%mgs; | %group;)?)'>
133 <!-- the duplication below is to produce an unambiguous content model
134 which allows annotation everywhere -->
135 <!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
136 (%simpleType; | %complexType;
137 | %element; | %attribute;
138 | %attributeGroup; | %group;
139 | %notation; | %annotation;)* )>
141 targetNamespace %URIref; #IMPLIED
142 version CDATA #IMPLIED
143 %nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'
145 finalDefault %complexDerivationSet; ''
146 blockDefault %blockSet; ''
148 elementFormDefault %formValues; 'unqualified'
149 attributeFormDefault %formValues; 'unqualified'
150 xml:lang CDATA #IMPLIED
152 <!-- Note the xmlns declaration is NOT in the Schema for Schemas,
153 because at the Infoset level where schemas operate,
154 xmlns(:prefix) is NOT an attribute! -->
155 <!-- The declaration of xmlns is a convenience for schema authors -->
157 <!-- The id attribute here and below is for use in external references
158 from non-schemas using simple fragment identifiers.
159 It is NOT used for schema-to-schema reference, internal or
162 <!-- a type is a named content type specification which allows attribute
166 <!ELEMENT %complexType; ((%annotation;)?,
167 (%simpleContent;|%complexContent;|
168 %particleAndAttrs;))>
170 <!ATTLIST %complexType;
171 name %NCName; #IMPLIED
173 abstract %boolean; #IMPLIED
174 final %complexDerivationSet; #IMPLIED
175 block %complexDerivationSet; #IMPLIED
176 mixed (true|false) 'false'
179 <!-- particleAndAttrs is shorthand for a root type -->
180 <!-- mixed is disallowed if simpleContent, overriden if complexContent
183 <!-- If anyAttribute appears in one or more referenced attributeGroups
184 and/or explicitly, the intersection of the permissions is used -->
186 <!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
187 <!ATTLIST %complexContent;
188 mixed (true|false) #IMPLIED
190 %complexContentAttrs;>
192 <!-- restriction should use the branch defined above, not the simple
193 one from part2; extension should use the full model -->
195 <!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
196 <!ATTLIST %simpleContent;
198 %simpleContentAttrs;>
200 <!-- restriction should use the simple branch from part2, not the
201 one defined above; extension should have no particle -->
203 <!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
204 <!ATTLIST %extension;
205 base %QName; #REQUIRED
209 <!-- an element is declared by either:
210 a name and a type (either nested or referenced via the type attribute)
211 or a ref to an existing element declaration -->
213 <!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
214 (%unique; | %key; | %keyref;)*)>
215 <!-- simpleType or complexType only if no type|ref attribute -->
216 <!-- ref not allowed at top level -->
218 name %NCName; #IMPLIED
221 type %QName; #IMPLIED
222 minOccurs %nonNegativeInteger; #IMPLIED
223 maxOccurs CDATA #IMPLIED
224 nillable %boolean; #IMPLIED
225 substitutionGroup %QName; #IMPLIED
226 abstract %boolean; #IMPLIED
227 final %complexDerivationSet; #IMPLIED
228 block %blockSet; #IMPLIED
229 default CDATA #IMPLIED
231 form %formValues; #IMPLIED
233 <!-- type and ref are mutually exclusive.
234 name and ref are mutually exclusive, one is required -->
235 <!-- In the absence of type AND ref, type defaults to type of
236 substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
237 <!-- default and fixed are mutually exclusive -->
239 <!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
241 name %NCName; #IMPLIED
243 minOccurs %nonNegativeInteger; #IMPLIED
244 maxOccurs CDATA #IMPLIED
248 <!ELEMENT %all; ((%annotation;)?, (%element;)*)>
250 minOccurs (1) #IMPLIED
251 maxOccurs (1) #IMPLIED
255 <!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
257 minOccurs %nonNegativeInteger; #IMPLIED
258 maxOccurs CDATA #IMPLIED
262 <!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
264 minOccurs %nonNegativeInteger; #IMPLIED
265 maxOccurs CDATA #IMPLIED
269 <!-- an anonymous grouping in a model, or
270 a top-level named group definition, or a reference to same -->
272 <!-- Note that if order is 'all', group is not allowed inside.
273 If order is 'all' THIS group must be alone (or referenced alone) at
274 the top level of a content model -->
275 <!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
276 <!-- Should allow minOccurs=0 inside order='all' . . . -->
278 <!ELEMENT %any; (%annotation;)?>
280 namespace CDATA '##any'
281 processContents (skip|lax|strict) 'strict'
282 minOccurs %nonNegativeInteger; '1'
287 <!-- namespace is interpreted as follows:
288 ##any - - any non-conflicting WFXML at all
290 ##other - - any non-conflicting WFXML from namespace other
293 ##local - - any unqualified non-conflicting WFXML/attribute
294 one or - - any non-conflicting WFXML from
295 more URI the listed namespaces
298 ##targetNamespace ##local may appear in the above list,
299 with the obvious meaning -->
301 <!ELEMENT %anyAttribute; (%annotation;)?>
302 <!ATTLIST %anyAttribute;
303 namespace CDATA '##any'
304 processContents (skip|lax|strict) 'strict'
307 <!-- namespace is interpreted as for 'any' above -->
309 <!-- simpleType only if no type|ref attribute -->
310 <!-- ref not allowed at top level, name iff at top level -->
311 <!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
312 <!ATTLIST %attribute;
313 name %NCName; #IMPLIED
316 type %QName; #IMPLIED
317 use (prohibited|optional|required) #IMPLIED
318 default CDATA #IMPLIED
320 form %formValues; #IMPLIED
322 <!-- type and ref are mutually exclusive.
323 name and ref are mutually exclusive, one is required -->
324 <!-- default for use is optional when nested, none otherwise -->
325 <!-- default and fixed are mutually exclusive -->
326 <!-- type attr and simpleType content are mutually exclusive -->
328 <!-- an attributeGroup is a named collection of attribute decls, or a
329 reference thereto -->
330 <!ELEMENT %attributeGroup; ((%annotation;)?,
331 (%attribute; | %attributeGroup;)*,
333 <!ATTLIST %attributeGroup;
334 name %NCName; #IMPLIED
337 %attributeGroupAttrs;>
339 <!-- ref iff no content, no name. ref iff not top level -->
341 <!-- better reference mechanisms -->
342 <!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
344 name %NCName; #REQUIRED
348 <!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
350 name %NCName; #REQUIRED
354 <!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
356 name %NCName; #REQUIRED
357 refer %QName; #REQUIRED
361 <!ELEMENT %selector; ((%annotation;)?)>
363 xpath %XPathExpr; #REQUIRED
366 <!ELEMENT %field; ((%annotation;)?)>
368 xpath %XPathExpr; #REQUIRED
372 <!-- Schema combination mechanisms -->
373 <!ELEMENT %include; (%annotation;)?>
375 schemaLocation %URIref; #REQUIRED
379 <!ELEMENT %import; (%annotation;)?>
381 namespace %URIref; #IMPLIED
382 schemaLocation %URIref; #IMPLIED
386 <!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
387 %attributeGroup; | %group;)*>
389 schemaLocation %URIref; #REQUIRED
393 <!ELEMENT %notation; (%annotation;)?>
395 name %NCName; #REQUIRED
397 public CDATA #REQUIRED
398 system %URIref; #IMPLIED
401 <!-- Annotation is either application information or documentation -->
402 <!-- By having these here they are available for datatypes as well
403 as all the structures elements -->
405 <!ELEMENT %annotation; (%appinfo; | %documentation;)*>
406 <!ATTLIST %annotation; %annotationAttrs;>
408 <!-- User must define annotation elements in internal subset for this
410 <!ELEMENT %appinfo; (((%globalBindings; | %schemaBindings; | %class; | %property; | %typesafeEnumClass; | %typesafeEnumMember; | %javaType;) | %bindings;)*)> <!-- too restrictive -->
412 source %URIref; #IMPLIED
415 <!ELEMENT %documentation; ANY> <!-- too restrictive -->
416 <!ATTLIST %documentation;
417 source %URIref; #IMPLIED
419 xml:lang CDATA #IMPLIED
420 %documentationAttrs;>
422 <!NOTATION XMLSchemaStructures PUBLIC
423 'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
424 <!NOTATION XML PUBLIC
425 'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >