XMLSchema.dtd 16 KB

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