home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 October / Chip_2001-10_cd1.bin / sharewar / htxtbldr / HB1.exe / HB10A.CAB / oebpkg1.dtd < prev    next >
Encoding:
Text File  |  2000-08-08  |  7.2 KB  |  280 lines

  1. <!--
  2.     Document Type Definition for the Open eBook package version 1.0.
  3.     
  4.     Version:  1.0
  5.     Revision: 19990916-x
  6.  
  7.     Authors:  Steve DeRose <steven_derose@brown.edu>
  8.               Gunter Hille <hille@abc.de>
  9.               Ben Trafford <bent@exemplary.net>
  10.               Garret Wilson <garret@globalmentor.com>
  11.  
  12.     Usage:
  13.         <?xml version="1.0"?>
  14.         <!DOCTYPE package 
  15.           PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0 Package//EN"
  16.           "http://openebook.org/dtds/oeb-1.0/oebpkg1.dtd">
  17.         <package unique-identifier="foo">
  18.           metadata
  19.           manifest 
  20.           spine
  21.           tours
  22.           guide
  23.         </package>
  24.           
  25.     References:
  26.       Transitional XHTML 1.0 DTD at http://www.w3.org/TR/xhtml1/DTD/transitional.dtd
  27. -->
  28.  
  29. <!-- ******** Character Mnemonic Entities ******** -->
  30.  
  31. <!-- OEB supports all XHTML mnemonics, but uses only one entity file. -->
  32. <!ENTITY % OEBEntities PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0 Entities//EN" "oeb1.ent">
  33. %OEBEntities;
  34.  
  35. <!-- ******** Attribute Types ******** -->
  36.  
  37. <!-- LanguageCode: An RFC1766 language code. -->
  38. <!ENTITY % LanguageCode "NMTOKEN">
  39.  
  40. <!-- URI: An RFC2396 Uniform Resource Identifier. -->
  41. <!ENTITY % URI "CDATA">
  42.  
  43. <!-- ******** Common Attributes ******** -->
  44.  
  45. <!-- InternationalAttributes: Attributes for internationalization.
  46.   xml:lang:     XML language code.
  47. -->
  48. <!ENTITY % InternationalAttributes
  49.   "xml:lang %LanguageCode; #IMPLIED"
  50. >
  51.  
  52. <!-- CoreAttributes: Most common attributes used by many elements.
  53.   id:       ID unique to the entire document.
  54. -->
  55. <!ENTITY % CoreAttributes "id ID #IMPLIED">
  56.  
  57. <!-- CommonAttributes: Common attributes used by many elements.
  58.   CoreAttributes:   Most common attributes.
  59.   InternationalAttributes:         Internationalization attributes.
  60. -->
  61. <!ENTITY % CommonAttributes
  62.   "%CoreAttributes;
  63.   %InternationalAttributes;"
  64. >
  65.  
  66. <!-- DCNamespaceAttribute: Attribute that declare the Dublin Core
  67.   namespace. Used mostly on each <dc:XXX> element to accomodate XML
  68.   parsers which require this unnecessarily. -->
  69. <!ENTITY % DCNamespaceAttribute
  70.   "xmlns:dc   %URI;   #FIXED  'http://purl.org/dc/elements/1.0/'"
  71. >
  72.  
  73. <!-- ******** OEB Package Elements ******** -->
  74.   
  75. <!-- A package must have metadata, a manifest, and a spine,
  76.     and optionally may include a tours and/or a guide section. -->
  77. <!ELEMENT package    (metadata, manifest, spine, tours?, guide?)>
  78. <!ATTLIST package
  79.   %CommonAttributes;
  80.   unique-identifier   IDREF    #REQUIRED
  81. >
  82.  
  83. <!-- The metadata section must have dc-metadata but may or may not
  84.   include x-metadata. -->
  85. <!ELEMENT metadata    (dc-metadata, x-metadata?)>
  86.  
  87. <!-- These elements are optional in <dc-metadata>. -->
  88. <!ENTITY % DCMetadataOptionalElements
  89.   "dc:Contributor  | dc:Creator | dc:Subject | dc:Description
  90.   | dc:Publisher |  dc:Date | dc:Type | dc:Format | dc:Source
  91.   | dc:Language | dc:Relation | dc:Coverage | dc:Rights"
  92. >
  93.  
  94. <!-- These are the optional and required elements of <dc-metadata>. -->
  95. <!ENTITY % DCMetadataGeneralElements
  96.   "%DCMetadataOptionalElements; | dc:Title |dc:Identifier"
  97. >
  98.  
  99. <!-- A dc-metadata section must have a dc:Title and a
  100.   dc:Identifier, and optionally other dc:XXX elements, all in any
  101.   order. -->
  102. <!ELEMENT dc-metadata ((%DCMetadataOptionalElements;)*,
  103.   ((dc:Title, (%DCMetadataOptionalElements; | dc:Title)*,
  104.     (dc:Identifier, (%DCMetadataGeneralElements;)*)) |
  105.   (dc:Identifier, (%DCMetadataOptionalElements; | dc:Identifier)*,
  106.     (dc:Title, (%DCMetadataGeneralElements;)*))))
  107.  
  108. <!ATTLIST dc-metadata
  109.   %CommonAttributes;
  110.   %DCNamespaceAttribute;
  111.   xmlns:oebpackage    %URI; #FIXED "http://openebook.org/namespaces/oeb-package/1.0/"
  112. >
  113.  
  114. <!-- A dc:Contributor element may optionally have a role and/or a file-as
  115.   attribute. -->
  116. <!ELEMENT dc:Contributor (#PCDATA)>
  117. <!ATTLIST dc:Contributor
  118.   %CommonAttributes;
  119.   %DCNamespaceAttribute;
  120.   role      NMTOKEN   #IMPLIED
  121.   file-as   CDATA        #IMPLIED
  122. >
  123.  
  124. <!ELEMENT dc:Title (#PCDATA)>
  125. <!ATTLIST dc:Title
  126.   %CommonAttributes;
  127.   %DCNamespaceAttribute;
  128. >
  129.  
  130. <!ELEMENT dc:Creator (#PCDATA)>
  131. <!ATTLIST dc:Creator
  132.   %CommonAttributes;
  133.   %DCNamespaceAttribute;
  134.   role      NMTOKEN   #IMPLIED
  135.   file-as   CDATA     #IMPLIED
  136. >
  137.  
  138. <!ELEMENT dc:Subject (#PCDATA)>
  139. <!ATTLIST dc:Subject
  140.   %CommonAttributes;
  141.   %DCNamespaceAttribute;
  142. >
  143.  
  144. <!ELEMENT dc:Description (#PCDATA)>
  145. <!ATTLIST dc:Description
  146.   %CommonAttributes;
  147.   %DCNamespaceAttribute;
  148. >
  149.  
  150. <!ELEMENT dc:Publisher (#PCDATA)>
  151. <!ATTLIST dc:Publisher
  152.   %CommonAttributes;
  153.   %DCNamespaceAttribute;
  154. >
  155.  
  156. <!ELEMENT dc:Date    (#PCDATA)>
  157. <!ATTLIST dc:Date
  158.   %CommonAttributes;
  159.   %DCNamespaceAttribute;
  160.   event NMTOKEN    #IMPLIED
  161. >
  162.  
  163. <!ELEMENT dc:Type (#PCDATA)>
  164. <!ATTLIST dc:Type
  165.   %CommonAttributes;
  166.   %DCNamespaceAttribute;
  167. >
  168.  
  169. <!ELEMENT dc:Format (#PCDATA)>
  170. <!ATTLIST dc:Format
  171.   %CommonAttributes;
  172.   %DCNamespaceAttribute;
  173. >
  174.  
  175. <!ELEMENT dc:Identifier (#PCDATA)>
  176. <!ATTLIST dc:Identifier
  177.   %CommonAttributes;
  178.   %DCNamespaceAttribute;
  179.   scheme NMTOKEN #IMPLIED
  180. >
  181.  
  182. <!ELEMENT dc:Source (#PCDATA)>
  183. <!ATTLIST dc:Source
  184.   %CommonAttributes;
  185.   %DCNamespaceAttribute;
  186. >
  187.  
  188. <!ELEMENT dc:Language (#PCDATA)>
  189. <!ATTLIST dc:Language
  190.   %CommonAttributes;
  191.   %DCNamespaceAttribute;
  192. >
  193.  
  194. <!ELEMENT dc:Relation (#PCDATA)>
  195. <!ATTLIST dc:Relation
  196.   %CommonAttributes;
  197.   %DCNamespaceAttribute;
  198. >
  199.  
  200. <!ELEMENT dc:Coverage    (#PCDATA)>
  201. <!ATTLIST dc:Coverage
  202.   %CommonAttributes;
  203.   %DCNamespaceAttribute;
  204. >
  205.  
  206. <!ELEMENT dc:Rights (#PCDATA)>
  207. <!ATTLIST dc:Rights
  208.   %CommonAttributes;
  209.   %DCNamespaceAttribute;
  210. >
  211.  
  212. <!-- The <x-metadata> element must have at least one <meta> element. -->
  213. <!ELEMENT x-metadata (meta+)>
  214. <!ATTLIST x-metadata %CommonAttributes;>
  215.  
  216. <!ELEMENT meta EMPTY>
  217. <!ATTLIST meta
  218.   %CommonAttributes;
  219.   name      NMTOKEN   #REQUIRED
  220.   content   CDATA     #REQUIRED
  221.   scheme    CDATA     #IMPLIED
  222. >
  223.  
  224. <!-- The manifest must contain one or more items. -->
  225. <!ELEMENT manifest (item+)>
  226. <!ATTLIST manifest %CommonAttributes;>
  227.  
  228. <!-- The CommonAttributes entity is not used here because in this case
  229.   the "id" attribute is required. -->
  230. <!ELEMENT item EMPTY>
  231. <!ATTLIST item
  232.   %InternationalAttributes;
  233.     id            ID      #REQUIRED
  234.     href          CDATA   #REQUIRED
  235.     media-type    CDATA   #REQUIRED
  236.     fallback      IDREF   #IMPLIED
  237. >
  238.  
  239. <!-- The spine must contain one or more itemrefs. -->
  240. <!ELEMENT spine    (itemref+)>
  241. <!ATTLIST spine    %CommonAttributes;>
  242.  
  243. <!ELEMENT itemref    EMPTY>
  244. <!ATTLIST itemref
  245.   %CommonAttributes;
  246.   idref    IDREF    #REQUIRED
  247. >
  248.  
  249. <!-- The tours element must have one or more tour elements. -->
  250. <!ELEMENT tours    (tour+)>
  251. <!ATTLIST tours    %CommonAttributes;>
  252.  
  253. <!-- Each tour of the set must contain at least one site. -->
  254. <!ELEMENT tour (site+)>
  255. <!ATTLIST tour
  256.   %CommonAttributes;
  257.   title    CDATA    #REQUIRED
  258. >
  259.  
  260. <!-- Each site in a tour must have a title and an href. -->
  261. <!ELEMENT site EMPTY>
  262. <!ATTLIST site
  263.   %CommonAttributes;
  264.   title   CDATA   #REQUIRED
  265.   href    CDATA   #REQUIRED
  266. >
  267.  
  268. <!-- The guide element must have one or more reference elements. -->
  269. <!ELEMENT guide    (reference+)>
  270. <!ATTLIST guide    %CommonAttributes;>
  271.  
  272. <!ELEMENT reference    EMPTY>
  273. <!ATTLIST reference
  274.   %CommonAttributes;
  275.   type    NMTOKEN   #REQUIRED
  276.   title   CDATA     #REQUIRED
  277.   href    CDATA     #REQUIRED
  278. >
  279.