home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / servlet-api.jar / javax / servlet / resources / XMLSchema.dtd < prev   
Encoding:
Extensible Markup Language  |  2004-08-28  |  16.7 KB  |  418 lines

  1. <!--
  2.   Copyright 2004 The Apache Software Foundation
  3.  
  4.   Licensed under the Apache License, Version 2.0 (the "License");
  5.   you may not use this file except in compliance with the License.
  6.   You may obtain a copy of the License at
  7.  
  8.       http://www.apache.org/licenses/LICENSE-2.0
  9.  
  10.   Unless required by applicable law or agreed to in writing, software
  11.   distributed under the License is distributed on an "AS IS" BASIS,
  12.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.   See the License for the specific language governing permissions and
  14.   limitations under the License.
  15. -->
  16. <!-- DTD for XML Schemas: Part 1: Structures
  17.      Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
  18.      Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
  19. <!-- $Id: XMLSchema.dtd,v 1.2 2004/03/18 16:40:34 jfarcand Exp $ -->
  20. <!-- Note this DTD is NOT normative, or even definitive. -->           <!--d-->
  21. <!-- prose copy in the structures REC is the definitive version -->    <!--d-->
  22. <!-- (which shouldn't differ from this one except for this -->         <!--d-->
  23. <!-- comment and entity expansions, but just in case) -->              <!--d-->
  24. <!-- With the exception of cases with multiple namespace
  25.      prefixes for the XML Schema namespace, any XML document which is
  26.      not valid per this DTD given redefinitions in its internal subset of the
  27.      'p' and 's' parameter entities below appropriate to its namespace
  28.      declaration of the XML Schema namespace is almost certainly not
  29.      a valid schema. -->
  30.  
  31. <!-- The simpleType element and its constituent parts
  32.      are defined in XML Schema: Part 2: Datatypes -->
  33. <!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
  34.  
  35. <!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
  36.                          schema document to establish a different
  37.                          namespace prefix -->
  38. <!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
  39.                          also define %s as the suffix for the appropriate
  40.                          namespace declaration (e.g. :foo) -->
  41. <!ENTITY % nds 'xmlns%s;'>
  42.  
  43. <!-- Define all the element names, with optional prefix -->
  44. <!ENTITY % schema "%p;schema">
  45. <!ENTITY % complexType "%p;complexType">
  46. <!ENTITY % complexContent "%p;complexContent">
  47. <!ENTITY % simpleContent "%p;simpleContent">
  48. <!ENTITY % extension "%p;extension">
  49. <!ENTITY % element "%p;element">
  50. <!ENTITY % unique "%p;unique">
  51. <!ENTITY % key "%p;key">
  52. <!ENTITY % keyref "%p;keyref">
  53. <!ENTITY % selector "%p;selector">
  54. <!ENTITY % field "%p;field">
  55. <!ENTITY % group "%p;group">
  56. <!ENTITY % all "%p;all">
  57. <!ENTITY % choice "%p;choice">
  58. <!ENTITY % sequence "%p;sequence">
  59. <!ENTITY % any "%p;any">
  60. <!ENTITY % anyAttribute "%p;anyAttribute">
  61. <!ENTITY % attribute "%p;attribute">
  62. <!ENTITY % attributeGroup "%p;attributeGroup">
  63. <!ENTITY % include "%p;include">
  64. <!ENTITY % import "%p;import">
  65. <!ENTITY % redefine "%p;redefine">
  66. <!ENTITY % notation "%p;notation">
  67.  
  68. <!-- annotation elements -->
  69. <!ENTITY % annotation "%p;annotation">
  70. <!ENTITY % appinfo "%p;appinfo">
  71. <!ENTITY % documentation "%p;documentation">
  72.  
  73. <!-- Customisation entities for the ATTLIST of each element type.
  74.      Define one of these if your schema takes advantage of the
  75.      anyAttribute='##other' in the schema for schemas -->
  76.  
  77. <!ENTITY % schemaAttrs ''>
  78. <!ENTITY % complexTypeAttrs ''>
  79. <!ENTITY % complexContentAttrs ''>
  80. <!ENTITY % simpleContentAttrs ''>
  81. <!ENTITY % extensionAttrs ''>
  82. <!ENTITY % elementAttrs ''>
  83. <!ENTITY % groupAttrs ''>
  84. <!ENTITY % allAttrs ''>
  85. <!ENTITY % choiceAttrs ''>
  86. <!ENTITY % sequenceAttrs ''>
  87. <!ENTITY % anyAttrs ''>
  88. <!ENTITY % anyAttributeAttrs ''>
  89. <!ENTITY % attributeAttrs ''>
  90. <!ENTITY % attributeGroupAttrs ''>
  91. <!ENTITY % uniqueAttrs ''>
  92. <!ENTITY % keyAttrs ''>
  93. <!ENTITY % keyrefAttrs ''>
  94. <!ENTITY % selectorAttrs ''>
  95. <!ENTITY % fieldAttrs ''>
  96. <!ENTITY % includeAttrs ''>
  97. <!ENTITY % importAttrs ''>
  98. <!ENTITY % redefineAttrs ''>
  99. <!ENTITY % notationAttrs ''>
  100. <!ENTITY % annotationAttrs ''>
  101. <!ENTITY % appinfoAttrs ''>
  102. <!ENTITY % documentationAttrs ''>
  103.  
  104. <!ENTITY % complexDerivationSet "CDATA">
  105.       <!-- #all or space-separated list drawn from derivationChoice -->
  106. <!ENTITY % blockSet "CDATA">
  107.       <!-- #all or space-separated list drawn from
  108.                       derivationChoice + 'substitution' -->
  109.  
  110. <!ENTITY % mgs '%all; | %choice; | %sequence;'>
  111. <!ENTITY % cs '%choice; | %sequence;'>
  112. <!ENTITY % formValues '(qualified|unqualified)'>
  113.  
  114.  
  115. <!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
  116.  
  117. <!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
  118.  
  119. <!-- This is used in part2 -->
  120. <!ENTITY % restriction1 '((%mgs; | %group;)?)'>
  121.  
  122. %xs-datatypes;
  123.  
  124. <!-- the duplication below is to produce an unambiguous content model
  125.      which allows annotation everywhere -->
  126. <!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
  127.                     ((%simpleType; | %complexType;
  128.                       | %element; | %attribute;
  129.                       | %attributeGroup; | %group;
  130.                       | %notation; ),
  131.                      (%annotation;)*)* )>
  132. <!ATTLIST %schema;
  133.    targetNamespace      %URIref;               #IMPLIED
  134.    version              CDATA                  #IMPLIED
  135.    %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'
  136.    xmlns                CDATA                  #IMPLIED
  137.    finalDefault         %complexDerivationSet; ''
  138.    blockDefault         %blockSet;             ''
  139.    id                   ID                     #IMPLIED
  140.    elementFormDefault   %formValues;           'unqualified'
  141.    attributeFormDefault %formValues;           'unqualified'
  142.    xml:lang             CDATA                  #IMPLIED
  143.    %schemaAttrs;>
  144. <!-- Note the xmlns declaration is NOT in the Schema for Schemas,
  145.      because at the Infoset level where schemas operate,
  146.      xmlns(:prefix) is NOT an attribute! -->
  147. <!-- The declaration of xmlns is a convenience for schema authors -->
  148.  
  149. <!-- The id attribute here and below is for use in external references
  150.      from non-schemas using simple fragment identifiers.
  151.      It is NOT used for schema-to-schema reference, internal or
  152.      external. -->
  153.  
  154. <!-- a type is a named content type specification which allows attribute
  155.      declarations-->
  156. <!-- -->
  157.  
  158. <!ELEMENT %complexType; ((%annotation;)?,
  159.                          (%simpleContent;|%complexContent;|
  160.                           %particleAndAttrs;))>
  161.  
  162. <!ATTLIST %complexType;
  163.           name      %NCName;                        #IMPLIED
  164.           id        ID                              #IMPLIED
  165.           abstract  %boolean;                       #IMPLIED
  166.           final     %complexDerivationSet;          #IMPLIED
  167.           block     %complexDerivationSet;          #IMPLIED
  168.           mixed (true|false) 'false'
  169.           %complexTypeAttrs;>
  170.  
  171. <!-- particleAndAttrs is shorthand for a root type -->
  172. <!-- mixed is disallowed if simpleContent, overriden if complexContent
  173.      has one too. -->
  174.  
  175. <!-- If anyAttribute appears in one or more referenced attributeGroups
  176.      and/or explicitly, the intersection of the permissions is used -->
  177.  
  178. <!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
  179. <!ATTLIST %complexContent;
  180.           mixed (true|false) #IMPLIED
  181.           id    ID           #IMPLIED
  182.           %complexContentAttrs;>
  183.  
  184. <!-- restriction should use the branch defined above, not the simple
  185.      one from part2; extension should use the full model  -->
  186.  
  187. <!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
  188. <!ATTLIST %simpleContent;
  189.           id    ID           #IMPLIED
  190.           %simpleContentAttrs;>
  191.  
  192. <!-- restriction should use the simple branch from part2, not the 
  193.      one defined above; extension should have no particle  -->
  194.  
  195. <!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
  196. <!ATTLIST %extension;
  197.           base  %QName;      #REQUIRED
  198.           id    ID           #IMPLIED
  199.           %extensionAttrs;>
  200.  
  201. <!-- an element is declared by either:
  202.  a name and a type (either nested or referenced via the type attribute)
  203.  or a ref to an existing element declaration -->
  204.  
  205. <!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
  206.                      (%unique; | %key; | %keyref;)*)>
  207. <!-- simpleType or complexType only if no type|ref attribute -->
  208. <!-- ref not allowed at top level -->
  209. <!ATTLIST %element;
  210.             name               %NCName;               #IMPLIED
  211.             id                 ID                     #IMPLIED
  212.             ref                %QName;                #IMPLIED
  213.             type               %QName;                #IMPLIED
  214.             minOccurs          %nonNegativeInteger;   #IMPLIED
  215.             maxOccurs          CDATA                  #IMPLIED
  216.             nillable           %boolean;              #IMPLIED
  217.             substitutionGroup  %QName;                #IMPLIED
  218.             abstract           %boolean;              #IMPLIED
  219.             final              %complexDerivationSet; #IMPLIED
  220.             block              %blockSet;             #IMPLIED
  221.             default            CDATA                  #IMPLIED
  222.             fixed              CDATA                  #IMPLIED
  223.             form               %formValues;           #IMPLIED
  224.             %elementAttrs;>
  225. <!-- type and ref are mutually exclusive.
  226.      name and ref are mutually exclusive, one is required -->
  227. <!-- In the absence of type AND ref, type defaults to type of
  228.      substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
  229. <!-- default and fixed are mutually exclusive -->
  230.  
  231. <!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
  232. <!ATTLIST %group; 
  233.           name        %NCName;               #IMPLIED
  234.           ref         %QName;                #IMPLIED
  235.           minOccurs   %nonNegativeInteger;   #IMPLIED
  236.           maxOccurs   CDATA                  #IMPLIED
  237.           id          ID                     #IMPLIED
  238.           %groupAttrs;>
  239.  
  240. <!ELEMENT %all; ((%annotation;)?, (%element;)*)>
  241. <!ATTLIST %all;
  242.           minOccurs   (1)                    #IMPLIED
  243.           maxOccurs   (1)                    #IMPLIED
  244.           id          ID                     #IMPLIED
  245.           %allAttrs;>
  246.  
  247. <!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
  248. <!ATTLIST %choice;
  249.           minOccurs   %nonNegativeInteger;   #IMPLIED
  250.           maxOccurs   CDATA                  #IMPLIED
  251.           id          ID                     #IMPLIED
  252.           %choiceAttrs;>
  253.  
  254. <!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
  255. <!ATTLIST %sequence;
  256.           minOccurs   %nonNegativeInteger;   #IMPLIED
  257.           maxOccurs   CDATA                  #IMPLIED
  258.           id          ID                     #IMPLIED
  259.           %sequenceAttrs;>
  260.  
  261. <!-- an anonymous grouping in a model, or
  262.      a top-level named group definition, or a reference to same -->
  263.  
  264. <!-- Note that if order is 'all', group is not allowed inside.
  265.      If order is 'all' THIS group must be alone (or referenced alone) at
  266.      the top level of a content model -->
  267. <!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
  268. <!-- Should allow minOccurs=0 inside order='all' . . . -->
  269.  
  270. <!ELEMENT %any; (%annotation;)?>
  271. <!ATTLIST %any;
  272.             namespace       CDATA                  '##any'
  273.             processContents (skip|lax|strict)      'strict'
  274.             minOccurs       %nonNegativeInteger;   '1'
  275.             maxOccurs       CDATA                  '1'
  276.             id              ID                     #IMPLIED
  277.             %anyAttrs;>
  278.  
  279. <!-- namespace is interpreted as follows:
  280.                   ##any      - - any non-conflicting WFXML at all
  281.  
  282.                   ##other    - - any non-conflicting WFXML from namespace other
  283.                                   than targetNamespace
  284.  
  285.                   ##local    - - any unqualified non-conflicting WFXML/attribute
  286.                   one or     - - any non-conflicting WFXML from
  287.                   more URI        the listed namespaces
  288.                   references
  289.  
  290.                   ##targetNamespace ##local may appear in the above list,
  291.                     with the obvious meaning -->
  292.  
  293. <!ELEMENT %anyAttribute; (%annotation;)?>
  294. <!ATTLIST %anyAttribute;
  295.             namespace       CDATA              '##any'
  296.             processContents (skip|lax|strict)  'strict'
  297.             id              ID                 #IMPLIED
  298.             %anyAttributeAttrs;>
  299. <!-- namespace is interpreted as for 'any' above -->
  300.  
  301. <!-- simpleType only if no type|ref attribute -->
  302. <!-- ref not allowed at top level, name iff at top level -->
  303. <!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
  304. <!ATTLIST %attribute;
  305.           name      %NCName;      #IMPLIED
  306.           id        ID            #IMPLIED
  307.           ref       %QName;       #IMPLIED
  308.           type      %QName;       #IMPLIED
  309.           use       (prohibited|optional|required) #IMPLIED
  310.           default   CDATA         #IMPLIED
  311.           fixed     CDATA         #IMPLIED
  312.           form      %formValues;  #IMPLIED
  313.           %attributeAttrs;>
  314. <!-- type and ref are mutually exclusive.
  315.      name and ref are mutually exclusive, one is required -->
  316. <!-- default for use is optional when nested, none otherwise -->
  317. <!-- default and fixed are mutually exclusive -->
  318. <!-- type attr and simpleType content are mutually exclusive -->
  319.  
  320. <!-- an attributeGroup is a named collection of attribute decls, or a
  321.      reference thereto -->
  322. <!ELEMENT %attributeGroup; ((%annotation;)?,
  323.                        (%attribute; | %attributeGroup;)*,
  324.                        (%anyAttribute;)?) >
  325. <!ATTLIST %attributeGroup;
  326.                  name       %NCName;       #IMPLIED
  327.                  id         ID             #IMPLIED
  328.                  ref        %QName;        #IMPLIED
  329.                  %attributeGroupAttrs;>
  330.  
  331. <!-- ref iff no content, no name.  ref iff not top level -->
  332.  
  333. <!-- better reference mechanisms -->
  334. <!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
  335. <!ATTLIST %unique;
  336.           name     %NCName;       #REQUIRED
  337.       id       ID             #IMPLIED
  338.       %uniqueAttrs;>
  339.  
  340. <!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)>
  341. <!ATTLIST %key;
  342.           name     %NCName;       #REQUIRED
  343.       id       ID             #IMPLIED
  344.       %keyAttrs;>
  345.  
  346. <!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
  347. <!ATTLIST %keyref;
  348.           name     %NCName;       #REQUIRED
  349.       refer    %QName;        #REQUIRED
  350.       id       ID             #IMPLIED
  351.       %keyrefAttrs;>
  352.  
  353. <!ELEMENT %selector; ((%annotation;)?)>
  354. <!ATTLIST %selector;
  355.           xpath %XPathExpr; #REQUIRED
  356.           id    ID          #IMPLIED
  357.           %selectorAttrs;>
  358. <!ELEMENT %field; ((%annotation;)?)>
  359. <!ATTLIST %field;
  360.           xpath %XPathExpr; #REQUIRED
  361.           id    ID          #IMPLIED
  362.           %fieldAttrs;>
  363.  
  364. <!-- Schema combination mechanisms -->
  365. <!ELEMENT %include; (%annotation;)?>
  366. <!ATTLIST %include;
  367.           schemaLocation %URIref; #REQUIRED
  368.           id             ID       #IMPLIED
  369.           %includeAttrs;>
  370.  
  371. <!ELEMENT %import; (%annotation;)?>
  372. <!ATTLIST %import;
  373.           namespace      %URIref; #IMPLIED
  374.           schemaLocation %URIref; #IMPLIED
  375.           id             ID       #IMPLIED
  376.           %importAttrs;>
  377.  
  378. <!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
  379.                       %attributeGroup; | %group;)*>
  380. <!ATTLIST %redefine;
  381.           schemaLocation %URIref; #REQUIRED
  382.           id             ID       #IMPLIED
  383.           %redefineAttrs;>
  384.  
  385. <!ELEMENT %notation; (%annotation;)?>
  386. <!ATTLIST %notation;
  387.       name        %NCName;    #REQUIRED
  388.       id          ID          #IMPLIED
  389.       public      CDATA       #REQUIRED
  390.       system      %URIref;    #IMPLIED
  391.       %notationAttrs;>
  392.  
  393. <!-- Annotation is either application information or documentation -->
  394. <!-- By having these here they are available for datatypes as well
  395.      as all the structures elements -->
  396.  
  397. <!ELEMENT %annotation; (%appinfo; | %documentation;)*>
  398. <!ATTLIST %annotation; %annotationAttrs;>
  399.  
  400. <!-- User must define annotation elements in internal subset for this
  401.      to work -->
  402. <!ELEMENT %appinfo; ANY>   <!-- too restrictive -->
  403. <!ATTLIST %appinfo;
  404.           source     %URIref;      #IMPLIED
  405.           id         ID         #IMPLIED
  406.           %appinfoAttrs;>
  407. <!ELEMENT %documentation; ANY>   <!-- too restrictive -->
  408. <!ATTLIST %documentation;
  409.           source     %URIref;   #IMPLIED
  410.           id         ID         #IMPLIED
  411.           xml:lang   CDATA      #IMPLIED
  412.           %documentationAttrs;>
  413.  
  414. <!NOTATION XMLSchemaStructures PUBLIC
  415.            'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
  416. <!NOTATION XML PUBLIC
  417.            'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >
  418.