home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 January / PCWorld_2001-01_cd.bin / Software / Topware / xmlspy / xmlspy35.exe / Main / XMLSchemaApr7.dtd < prev    next >
Encoding:
Extensible Markup Language  |  2000-11-20  |  11.1 KB  |  293 lines

  1. <!-- edited with XML Spy v3.0b3 NT (http://www.xmlspy.com) by Vladislav Gavrielov (Icon) -->
  2. <!-- DTD for XML Schemas: Part 1: Structures -->
  3. <!-- $Id: XMLSchema.dtd,v 1.1 2000/04/06 13:50:43 aqw Exp $ -->
  4. <!-- Note this DTD is NOT the normative structures DTD - - the
  5.      prose copy in the structures REC is the normative version (which
  6.      shouldn't differ from this one except for this comment and entity
  7.      expansions, but just in case -->
  8. <!-- The the datatype element and its components
  9.      are defined in XML Schema: Part 2: Datatypes -->
  10. <!-- Note %p is defined in part2.dtd -->
  11. <!ENTITY % xs-datatypes PUBLIC 'datatypes' 'part2.dtd'>
  12. %xs-datatypes;
  13. <!ENTITY % s ''>
  14. <!-- if %p is defined (e.g. as foo:) then you must
  15.                       also define %s as the suffix for the appropriate
  16.                       namespace declaration (e.g. :foo) -->
  17. <!ENTITY % nds 'xmlns%s;'>
  18. <!-- Define all the element names, with optional prefix -->
  19. <!ENTITY % schema "%p;schema">
  20. <!ENTITY % complexType "%p;complexType">
  21. <!ENTITY % element "%p;element">
  22. <!ENTITY % unique "%p;unique">
  23. <!ENTITY % key "%p;key">
  24. <!ENTITY % keyref "%p;keyref">
  25. <!ENTITY % selector "%p;selector">
  26. <!ENTITY % field "%p;field">
  27. <!ENTITY % group "%p;group">
  28. <!ENTITY % all "%p;all">
  29. <!ENTITY % choice "%p;choice">
  30. <!ENTITY % sequence "%p;sequence">
  31. <!ENTITY % any "%p;any">
  32. <!ENTITY % anyAttribute "%p;anyAttribute">
  33. <!ENTITY % attribute "%p;attribute">
  34. <!ENTITY % attributeGroup "%p;attributeGroup">
  35. <!ENTITY % include "%p;include">
  36. <!ENTITY % import "%p;import">
  37. <!ENTITY % notation "%p;notation">
  38. <!-- Customisation entities for the ATTLIST of each element type.
  39.      Define one of these if your schema takes advantage of the
  40.      anyAttribute='##other' in the schema for schemas -->
  41. <!ENTITY % schemaAttrs ''>
  42. <!ENTITY % complexTypeAttrs ''>
  43. <!ENTITY % elementAttrs ''>
  44. <!ENTITY % groupAttrs ''>
  45. <!ENTITY % allAttrs ''>
  46. <!ENTITY % choiceAttrs ''>
  47. <!ENTITY % sequenceAttrs ''>
  48. <!ENTITY % anyAttrs ''>
  49. <!ENTITY % anyAttributeAttrs ''>
  50. <!ENTITY % attributeAttrs ''>
  51. <!ENTITY % attributeGroupAttrs ''>
  52. <!ENTITY % uniqueAttrs ''>
  53. <!ENTITY % keyAttrs ''>
  54. <!ENTITY % keyrefAttrs ''>
  55. <!ENTITY % includeAttrs ''>
  56. <!ENTITY % importAttrs ''>
  57. <!ENTITY % notationAttrs ''>
  58. <!ENTITY % complexDerivationChoice "(extension|restriction)">
  59. <!ENTITY % complexDerivationSet "CDATA">
  60. <!-- #all or space-separated list drawn from derivationChoice -->
  61. <!ENTITY % blockSet "CDATA">
  62. <!-- #all or space-separated list drawn from
  63.                       derivationChoice + 'equivClass' -->
  64. <!ENTITY % mgs '%all; | %choice; | %sequence;'>
  65. <!ENTITY % cs '%choice; | %sequence;'>
  66. <!ENTITY % formValues '(qualified|unqualified)'>
  67. <!-- the duplication below is to produce an unambiguous content model
  68.      which allows annotation everywhere -->
  69. <!ELEMENT %schema; ((%include; | %import; | %annotation;)*, (%simpleType; | %complexType; | %element; | %attribute; | %attributeGroup; | %group; | %notation;), (%annotation; | %simpleType; | %complexType; | %element; | %attribute; | %attributeGroup; | %group; | %notation;)*)>
  70. <!ATTLIST %schema;
  71.     targetNamespace %URIref; #IMPLIED
  72.     version CDATA #IMPLIED
  73.     %nds; %URIref; #FIXED "http://www.w3.org/1999/XMLSchema"
  74.     finalDefault %complexDerivationSet; ""
  75.     blockDefault %blockSet; ""
  76.     id ID #IMPLIED
  77.     elementFormDefault %formValues; "unqualified"
  78.     attributeFormDefault %formValues; "unqualified"
  79.     %schemaAttrs; 
  80. >
  81. <!-- Note the xmlns declaration is NOT in the Schema for Schemas,
  82.      because at the Infoset level where schemas operate,
  83.      xmlns(:prefix) is NOT an attribute! -->
  84. <!-- The id attribute here and below is for use in external references
  85.      from non-schemas using simple fragment identifiers.
  86.      It is NOT used for schema-to-schema reference, internal or
  87.      external. -->
  88. <!-- a type is a named content type specification which allows attribute
  89.      declarations-->
  90. <!-- -->
  91. <!ELEMENT %complexType; ((%annotation;)?, ((%facet;)* | (%element; | %mgs; | %group; | %any;)*), (%attribute; | %attributeGroup;)*, (%anyAttribute;)?)>
  92. <!ATTLIST %complexType;
  93.     name %NCName; #IMPLIED
  94.     id ID #IMPLIED
  95.     content (textOnly | mixed | elementOnly | empty) #IMPLIED
  96.     abstract %boolean; "false"
  97.     final %complexDerivationSet; ""
  98.     block %complexDerivationSet; ""
  99.     derivedBy %complexDerivationChoice; #IMPLIED
  100.     base %QName; #IMPLIED
  101.     %complexTypeAttrs; 
  102. >
  103. <!-- facets only if derivedBy='restriction' -->
  104. <!-- (element|group|any) only if content=mixed or =elementOnly
  105.      and no base at all, i.e. a root type, or base is a complex type -->
  106. <!-- content defaults to base's if there is a complex base,
  107.      textonly if there's a simple base,
  108.      'mixed' if no base (because that's the urType's content)
  109.              and no content daughters,
  110.      'elementOnly' otherwise -->
  111. <!-- should we replace content='empty' with content='elementOnly'
  112.      final='#all' plus no content? -->
  113. <!-- If one top-level group, that IS the content model, otherwise
  114.      an implicit group obtains.
  115.      This is
  116.        <sequence minOccurs='1' maxOccurs='1'>
  117.      unless content='mixed', in which case it's
  118.        <choice minOccurs='0' maxOccurs='unbounded'> -->
  119. <!-- If anyAttribute appears in one or more referenced attributeGroups
  120.      and/or explicitly, the intersection of the permissions is used -->
  121. <!-- A text-only type with no attributes differs from a datatype with
  122.      the same base qualified the same way in regard to the impact on
  123.      attributes of anyAttribute -->
  124. <!-- an element is declared by either:
  125.  a name and a type (either nested or referenced via the type attribute)
  126. or:
  127.  a ref to an existing element declaration -->
  128. <!ELEMENT %element; ((%annotation;)?, (%complexType; | %simpleType;)?, (%unique; | %key; | %keyref;)*)>
  129. <!-- simpleType or complexType only if no type|ref attribute -->
  130. <!-- ref not allowed at top level -->
  131. <!ATTLIST %element;
  132.     name %NCName; #IMPLIED
  133.     id ID #IMPLIED
  134.     ref %QName; #IMPLIED
  135.     type %QName; #IMPLIED
  136.     minOccurs %nonNegativeInteger; "1"
  137.     maxOccurs CDATA #IMPLIED
  138.     nullable %boolean; "false"
  139.     equivClass %QName; #IMPLIED
  140.     abstract %boolean; "false"
  141.     final %complexDerivationSet; ""
  142.     block %blockSet; ""
  143.     default CDATA #IMPLIED
  144.     fixed CDATA #IMPLIED
  145.     form %formValues; #IMPLIED
  146.     %elementAttrs; 
  147. >
  148. <!-- type and ref are mutually exclusive.
  149.      name and ref are mutually exculsive, one is required -->
  150. <!-- In the absence of type AND ref, type defaults to type of
  151.      equivClass, if any, else the ur-type, i.e. unconstrained -->
  152. <!-- maxOccurs defaults to 1 or minOccurs, whichever is greater -->
  153. <!-- default and fixed are mutually exclusive -->
  154. <!ELEMENT %group; ((%annotation;)?, (%element; | %group; | %mgs; | %any;)*)>
  155. <!ATTLIST %group;
  156.     name %NCName; #IMPLIED
  157.     ref %QName; #IMPLIED
  158.     minOccurs %nonNegativeInteger; "1"
  159.     maxOccurs CDATA #IMPLIED
  160.     id ID #IMPLIED
  161.     %groupAttrs; 
  162. >
  163. <!ELEMENT %all; ((%annotation;)?, (%element; | %group; | %cs; | %any;)*)>
  164. <!ATTLIST %all;
  165.     minOccurs %nonNegativeInteger; "1"
  166.     maxOccurs CDATA #IMPLIED
  167.     id ID #IMPLIED
  168.     %allAttrs; 
  169. >
  170. <!ELEMENT %choice; ((%annotation;)?, (%element; | %group; | %cs; | %any;)*)>
  171. <!ATTLIST %choice;
  172.     minOccurs %nonNegativeInteger; "1"
  173.     maxOccurs CDATA #IMPLIED
  174.     id ID #IMPLIED
  175.     %choiceAttrs; 
  176. >
  177. <!ELEMENT %sequence; ((%annotation;)?, (%element; | %group; | %cs; | %any;)*)>
  178. <!ATTLIST %sequence;
  179.     minOccurs %nonNegativeInteger; "1"
  180.     maxOccurs CDATA #IMPLIED
  181.     id ID #IMPLIED
  182.     %sequenceAttrs; 
  183. >
  184. <!-- an anonymous grouping in a model, or
  185.      a top-level named group definition, or a reference to same -->
  186. <!-- Note that if order is 'all', group is not allowed inside.
  187.      If order is 'all' THIS group must be alone (or referenced alone) at
  188.      the top level of a content model -->
  189. <!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
  190. <!-- Should allow minOccurs=0 inside order='all' . . . -->
  191. <!ELEMENT %any; (%annotation;)?>
  192. <!ATTLIST %any;
  193.     namespace CDATA "##any"
  194.     processContents (skip | lax | strict) "strict"
  195.     minOccurs %nonNegativeInteger; "1"
  196.     maxOccurs CDATA #IMPLIED
  197.     %anyAttrs; 
  198. >
  199. <!-- namespace is interpreted as follows:
  200.                   ##any      - - any non-conflicting WFXML at all
  201.  
  202.                   ##other    - - any non-conflicting WFXML from namespace other
  203.                                   than targetNamespace
  204.  
  205.                   ##local    - - any unqualified non-conflicting WFXML/attribute
  206.                   one or     - - any non-conflicting WFXML from
  207.                   more URI        the listed namespaces
  208.                   references
  209.  
  210.                   ##targetNamespace may appear in the above list, with the
  211.                    obvious meaning -->
  212. <!ELEMENT %anyAttribute; (%annotation;)?>
  213. <!ATTLIST %anyAttribute;
  214.     namespace CDATA "##any"
  215.     %anyAttributeAttrs; 
  216. >
  217. <!-- namespace is interpreted as for 'any' above -->
  218. <!-- simpleType only if no type|ref attribute -->
  219. <!-- ref not allowed at top level, name iff at top level -->
  220. <!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
  221. <!ATTLIST %attribute;
  222.     name %NCName; #IMPLIED
  223.     id ID #IMPLIED
  224.     ref %QName; #IMPLIED
  225.     type %QName; #IMPLIED
  226.     use (prohibited | optional | required | fixed | default) #IMPLIED
  227.     value CDATA #IMPLIED
  228.     form %formValues; #IMPLIED
  229.     %attributeAttrs; 
  230. >
  231. <!-- type and ref are mutually exclusive.
  232.      name and ref are mutually exculsive, one is required -->
  233. <!-- value only if use is fixed, required or default, or name -->
  234. <!-- name and use are mutually exclusive -->
  235. <!-- default for use is optional when nested, none otherwise -->
  236. <!-- type attr and simpleType content are mutually exclusive -->
  237. <!-- an attributeGroup is a named collection of attribute decls, or a
  238.      reference thereto -->
  239. <!ELEMENT %attributeGroup; ((%annotation;)?, (%attribute; | %attributeGroup;)*, (%anyAttribute;)?)>
  240. <!ATTLIST %attributeGroup;
  241.     name %NCName; #IMPLIED
  242.     id ID #IMPLIED
  243.     ref %QName; #IMPLIED
  244.     %attributeGroupAttrs; 
  245. >
  246. <!-- ref iff no content, no name.  ref iff not top level -->
  247. <!-- better reference mechanisms -->
  248. <!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
  249. <!ATTLIST %unique;
  250.     name %NCName; #REQUIRED
  251.     id ID #IMPLIED
  252.     %uniqueAttrs; 
  253. >
  254. <!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
  255. <!ATTLIST %key;
  256.     name %NCName; #REQUIRED
  257.     id ID #IMPLIED
  258.     %keyAttrs; 
  259. >
  260. <!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
  261. <!ATTLIST %keyref;
  262.     name %NCName; #REQUIRED
  263.     id ID #IMPLIED
  264.     refer %QName; #REQUIRED
  265.     %keyrefAttrs; 
  266. >
  267. <!ELEMENT %selector; (#PCDATA)>
  268. <!ELEMENT %field; (#PCDATA)>
  269. <!-- Schema combination mechanisms -->
  270. <!ELEMENT %include; (%annotation;)?>
  271. <!ATTLIST %include;
  272.     schemaLocation %URIref; #REQUIRED
  273.     %includeAttrs; 
  274. >
  275. <!ELEMENT %import; (%annotation;)?>
  276. <!ATTLIST %import;
  277.     namespace %URIref; #IMPLIED
  278.     schemaLocation %URIref; #IMPLIED
  279.     %importAttrs; 
  280. >
  281. <!ELEMENT %notation; (%annotation;)?>
  282. <!ATTLIST %notation;
  283.     name %NCName; #REQUIRED
  284.     id ID #IMPLIED
  285.     public CDATA #REQUIRED
  286.     system %URIref; #IMPLIED
  287.     %notationAttrs; 
  288. >
  289. <!NOTATION XMLSchemaStructures PUBLIC 'structures'
  290.            'http://www.w3.org/1999/XMLSchema.xsd'>
  291. <!NOTATION XML PUBLIC 'REC-xml-1998-0210'
  292.                'http://www.w3.org/TR/1998/REC-xml-19980210'>
  293.