xml.schema/src/org/netbeans/modules/xml/schema/resources/XMLSchema_jaxb.dtd
author Milutin Kristofic <mkristofic@netbeans.org>
Mon, 30 Jan 2017 14:30:54 +0100
changeset 1583 fe20f672a61a
parent 47 0df50cd33223
permissions -rw-r--r--
Added Missing copyright information in source files
     1 <!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
     2 <!--
     3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4 
     5 Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     6 
     7 Oracle and Java are registered trademarks of Oracle and/or its affiliates.
     8 Other names may be trademarks of their respective owners.
     9 
    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]"
    27 
    28 Contributor(s):
    29 
    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.
    33 
    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.
    44 -->
    45 
    46 <!-- The bindingschema -->
    47 <!ENTITY % bindingschema PUBLIC 'bindingschema' 'bindingschema_1_0.dtd' >
    48 
    49 <!ENTITY % nds 'xmlns%s;'>
    50 
    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">
    75 
    76 <!-- annotation elements -->
    77 <!ENTITY % annotation "%p;annotation">
    78 <!ENTITY % appinfo "%p;appinfo">
    79 <!ENTITY % documentation "%p;documentation">
    80 
    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 -->
    84 
    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 ''>
   111 
   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' -->
   117 
   118 <!ENTITY % mgs '%all; | %choice; | %sequence;'>
   119 <!ENTITY % cs '%choice; | %sequence;'>
   120 <!ENTITY % formValues '(qualified|unqualified)'>
   121 
   122 
   123 <!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
   124 
   125 <!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
   126 
   127 <!-- This is used in part2 -->
   128 <!ENTITY % restriction1 '((%mgs; | %group;)?)'>
   129 
   130 %xs-datatypes;
   131 %bindingschema;
   132 
   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;)* )>
   140 <!ATTLIST %schema;
   141    targetNamespace      %URIref;               #IMPLIED
   142    version              CDATA                  #IMPLIED
   143    %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'
   144    xmlns                CDATA                  #IMPLIED
   145    finalDefault         %complexDerivationSet; ''
   146    blockDefault         %blockSet;             ''
   147    id                   ID                     #IMPLIED
   148    elementFormDefault   %formValues;           'unqualified'
   149    attributeFormDefault %formValues;           'unqualified'
   150    xml:lang             CDATA                  #IMPLIED
   151    %schemaAttrs;>
   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 -->
   156  
   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
   160      external. -->
   161 
   162 <!-- a type is a named content type specification which allows attribute
   163      declarations-->
   164 <!-- -->
   165 
   166 <!ELEMENT %complexType; ((%annotation;)?,
   167                          (%simpleContent;|%complexContent;|
   168                           %particleAndAttrs;))>
   169 
   170 <!ATTLIST %complexType;
   171           name      %NCName;                        #IMPLIED
   172           id        ID                              #IMPLIED
   173           abstract  %boolean;                       #IMPLIED
   174           final     %complexDerivationSet;          #IMPLIED
   175           block     %complexDerivationSet;          #IMPLIED
   176           mixed (true|false) 'false'
   177           %complexTypeAttrs;>
   178 
   179 <!-- particleAndAttrs is shorthand for a root type -->
   180 <!-- mixed is disallowed if simpleContent, overriden if complexContent
   181      has one too. -->
   182 
   183 <!-- If anyAttribute appears in one or more referenced attributeGroups
   184      and/or explicitly, the intersection of the permissions is used -->
   185 
   186 <!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
   187 <!ATTLIST %complexContent;
   188           mixed (true|false) #IMPLIED
   189           id    ID           #IMPLIED
   190           %complexContentAttrs;>
   191 
   192 <!-- restriction should use the branch defined above, not the simple
   193      one from part2; extension should use the full model  -->
   194 
   195 <!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
   196 <!ATTLIST %simpleContent;
   197           id    ID           #IMPLIED
   198           %simpleContentAttrs;>
   199 
   200 <!-- restriction should use the simple branch from part2, not the 
   201      one defined above; extension should have no particle  -->
   202 
   203 <!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
   204 <!ATTLIST %extension;
   205           base  %QName;      #REQUIRED
   206           id    ID           #IMPLIED
   207           %extensionAttrs;>
   208 
   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 -->
   212 
   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 -->
   217 <!ATTLIST %element;
   218             name               %NCName;               #IMPLIED
   219             id                 ID                     #IMPLIED
   220             ref                %QName;                #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
   230             fixed              CDATA                  #IMPLIED
   231             form               %formValues;           #IMPLIED
   232             %elementAttrs;>
   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 -->
   238 
   239 <!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
   240 <!ATTLIST %group; 
   241           name        %NCName;               #IMPLIED
   242           ref         %QName;                #IMPLIED
   243           minOccurs   %nonNegativeInteger;   #IMPLIED
   244           maxOccurs   CDATA                  #IMPLIED
   245           id          ID                     #IMPLIED
   246           %groupAttrs;>
   247 
   248 <!ELEMENT %all; ((%annotation;)?, (%element;)*)>
   249 <!ATTLIST %all;
   250           minOccurs   (1)                    #IMPLIED
   251           maxOccurs   (1)                    #IMPLIED
   252           id          ID                     #IMPLIED
   253           %allAttrs;>
   254 
   255 <!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
   256 <!ATTLIST %choice;
   257           minOccurs   %nonNegativeInteger;   #IMPLIED
   258           maxOccurs   CDATA                  #IMPLIED
   259           id          ID                     #IMPLIED
   260           %choiceAttrs;>
   261 
   262 <!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
   263 <!ATTLIST %sequence;
   264           minOccurs   %nonNegativeInteger;   #IMPLIED
   265           maxOccurs   CDATA                  #IMPLIED
   266           id          ID                     #IMPLIED
   267           %sequenceAttrs;>
   268 
   269 <!-- an anonymous grouping in a model, or
   270      a top-level named group definition, or a reference to same -->
   271 
   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' . . . -->
   277 
   278 <!ELEMENT %any; (%annotation;)?>
   279 <!ATTLIST %any;
   280             namespace       CDATA                  '##any'
   281             processContents (skip|lax|strict)      'strict'
   282             minOccurs       %nonNegativeInteger;   '1'
   283             maxOccurs       CDATA                  '1'
   284             id              ID                     #IMPLIED
   285             %anyAttrs;>
   286 
   287 <!-- namespace is interpreted as follows:
   288                   ##any      - - any non-conflicting WFXML at all
   289 
   290                   ##other    - - any non-conflicting WFXML from namespace other
   291                                   than targetNamespace
   292 
   293                   ##local    - - any unqualified non-conflicting WFXML/attribute
   294                   one or     - - any non-conflicting WFXML from
   295                   more URI        the listed namespaces
   296                   references
   297 
   298                   ##targetNamespace ##local may appear in the above list,
   299                     with the obvious meaning -->
   300 
   301 <!ELEMENT %anyAttribute; (%annotation;)?>
   302 <!ATTLIST %anyAttribute;
   303             namespace       CDATA              '##any'
   304             processContents (skip|lax|strict)  'strict'
   305             id              ID                 #IMPLIED
   306             %anyAttributeAttrs;>
   307 <!-- namespace is interpreted as for 'any' above -->
   308 
   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
   314           id        ID            #IMPLIED
   315           ref       %QName;       #IMPLIED
   316           type      %QName;       #IMPLIED
   317           use       (prohibited|optional|required) #IMPLIED
   318           default   CDATA         #IMPLIED
   319           fixed     CDATA         #IMPLIED
   320           form      %formValues;  #IMPLIED
   321           %attributeAttrs;>
   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 -->
   327 
   328 <!-- an attributeGroup is a named collection of attribute decls, or a
   329      reference thereto -->
   330 <!ELEMENT %attributeGroup; ((%annotation;)?,
   331                        (%attribute; | %attributeGroup;)*,
   332                        (%anyAttribute;)?) >
   333 <!ATTLIST %attributeGroup;
   334                  name       %NCName;       #IMPLIED
   335                  id         ID             #IMPLIED
   336                  ref        %QName;        #IMPLIED
   337                  %attributeGroupAttrs;>
   338 
   339 <!-- ref iff no content, no name.  ref iff not top level -->
   340 
   341 <!-- better reference mechanisms -->
   342 <!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
   343 <!ATTLIST %unique;
   344           name     %NCName;       #REQUIRED
   345 	  id       ID             #IMPLIED
   346 	  %uniqueAttrs;>
   347 
   348 <!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)>
   349 <!ATTLIST %key;
   350           name     %NCName;       #REQUIRED
   351 	  id       ID             #IMPLIED
   352 	  %keyAttrs;>
   353 
   354 <!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
   355 <!ATTLIST %keyref;
   356           name     %NCName;       #REQUIRED
   357 	  refer    %QName;        #REQUIRED
   358 	  id       ID             #IMPLIED
   359 	  %keyrefAttrs;>
   360 
   361 <!ELEMENT %selector; ((%annotation;)?)>
   362 <!ATTLIST %selector;
   363           xpath %XPathExpr; #REQUIRED
   364           id    ID          #IMPLIED
   365           %selectorAttrs;>
   366 <!ELEMENT %field; ((%annotation;)?)>
   367 <!ATTLIST %field;
   368           xpath %XPathExpr; #REQUIRED
   369           id    ID          #IMPLIED
   370           %fieldAttrs;>
   371 
   372 <!-- Schema combination mechanisms -->
   373 <!ELEMENT %include; (%annotation;)?>
   374 <!ATTLIST %include;
   375           schemaLocation %URIref; #REQUIRED
   376           id             ID       #IMPLIED
   377           %includeAttrs;>
   378 
   379 <!ELEMENT %import; (%annotation;)?>
   380 <!ATTLIST %import;
   381           namespace      %URIref; #IMPLIED
   382           schemaLocation %URIref; #IMPLIED
   383           id             ID       #IMPLIED
   384           %importAttrs;>
   385 
   386 <!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
   387                       %attributeGroup; | %group;)*>
   388 <!ATTLIST %redefine;
   389           schemaLocation %URIref; #REQUIRED
   390           id             ID       #IMPLIED
   391           %redefineAttrs;>
   392 
   393 <!ELEMENT %notation; (%annotation;)?>
   394 <!ATTLIST %notation;
   395 	  name        %NCName;    #REQUIRED
   396 	  id          ID          #IMPLIED
   397 	  public      CDATA       #REQUIRED
   398 	  system      %URIref;    #IMPLIED
   399 	  %notationAttrs;>
   400 
   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 -->
   404 
   405 <!ELEMENT %annotation; (%appinfo; | %documentation;)*>
   406 <!ATTLIST %annotation; %annotationAttrs;>
   407 
   408 <!-- User must define annotation elements in internal subset for this
   409      to work -->
   410 <!ELEMENT %appinfo; (((%globalBindings; | %schemaBindings; | %class; | %property; | %typesafeEnumClass; | %typesafeEnumMember; | %javaType;) | %bindings;)*)>   <!-- too restrictive -->
   411 <!ATTLIST %appinfo;
   412           source     %URIref;      #IMPLIED
   413           id         ID         #IMPLIED
   414           %appinfoAttrs;>
   415 <!ELEMENT %documentation; ANY>   <!-- too restrictive -->
   416 <!ATTLIST %documentation;
   417           source     %URIref;   #IMPLIED
   418           id         ID         #IMPLIED
   419           xml:lang   CDATA      #IMPLIED
   420           %documentationAttrs;>
   421 
   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' >