Final (I mean it this time) changes prior to republication
[project-aon.git] / xml / gamebook.dtd
index 481e58a..a694d6f 100644 (file)
@@ -1,5 +1,5 @@
 <!-- ============================================================= -->
-<!--             Gamebook Document Type Definition v0.11           -->
+<!--             Gamebook Document Type Definition v0.12           -->
 <!-- ============================================================= -->
 <!--
 
@@ -13,6 +13,24 @@ $Id$
 
 Change Log:
 
+19 December 2006 (version 0.12.2)
+ * Added the "line" element to the inline elements list.
+
+19 December 2006 (version 0.12.1)
+ * Upgraded the table model to included "caption", "colgroup", "thead",
+   "tfoot", and "tbdoy" elements and the cell scoping attributes
+   "rowspan", "colspan", "axis", and "scope".
+ * Deprecated the "br" element in favor of the "line" element.
+
+25 March 2006 (version 0.12.0)
+ * Added "illref", "illustrations" and "illgroup". Still backwards
+   compatible.
+
+26 December 2005 (version 0.11.4)
+ * Added link.attributes and the optional "series" attribute to
+   "bookref", and fleshed out the "bookref" and "footref"
+   descriptions.
+
 5 December 2005 (version 0.11.3)
  * Corrected ATTLISTs of character elements
  * Added "ch.apos", "ch.frac116", and "ch.plus" elements
@@ -44,7 +62,7 @@ Change Log:
 4 January 2003 (version 0.10.2)
  * Moved the specialized character entity definitions into module
    files.
-
+x
 5 October 2002 (version 0.10.1)
  * Added the "lellips" and "minus" entities and changed the definition
    of the "emdash" entity.
@@ -143,9 +161,9 @@ III. Block Elements
 
 <!ENTITY % character.content "ch.apos | ch.nbsp | ch.iexcl | ch.cent | ch.pound | ch.curren | ch.yen | ch.brvbar | ch.sect | ch.uml | ch.copy | ch.ordf | ch.laquo | ch.not | ch.shy | ch.reg | ch.macr | ch.deg | ch.plusmn | ch.sup2 | ch.sup3 | ch.acute | ch.micro | ch.para | ch.middot | ch.cedil | ch.sup1 | ch.ordm | ch.raquo | ch.frac14 | ch.frac12 | ch.frac34 | ch.iquest | ch.Agrave | ch.Aacute | ch.Acirc | ch.Atilde | ch.Auml | ch.Aring | ch.AElig | ch.Ccedil | ch.Egrave | ch.Eacute | ch.Ecirc | ch.Euml | ch.Igrave | ch.Iacute | ch.Icirc | ch.Iuml | ch.ETH | ch.Ntilde | ch.Ograve | ch.Oacute | ch.Ocirc | ch.Otilde | ch.Ouml | ch.times | ch.Oslash | ch.Ugrave | ch.Uacute | ch.Ucirc | ch.Uuml | ch.Yacute | ch.THORN | ch.szlig | ch.agrave | ch.aacute | ch.acirc | ch.atilde | ch.auml | ch.aring | ch.aelig | ch.ccedil | ch.egrave | ch.eacute | ch.ecirc | ch.euml | ch.igrave | ch.iacute | ch.icirc | ch.iuml | ch.eth | ch.ntilde | ch.ograve | ch.oacute | ch.ocirc | ch.otilde | ch.ouml | ch.divide | ch.oslash | ch.ugrave | ch.uacute | ch.ucirc | ch.uuml | ch.yacute | ch.thorn | ch.yuml | ch.ampersand | ch.lsquot | ch.rsquot | ch.ldquot | ch.rdquot | ch.minus | ch.endash | ch.emdash | ch.ellips | ch.lellips | ch.blankline | ch.percent | ch.thinspace | ch.frac116 | ch.plus">
 
-<!ENTITY % inline.content "#PCDATA | a | bookref | footref | em | strong | thought | foreign | quote | cite | code | br | typ | onomatopoeia | spell | item | %character.content;">
+<!ENTITY % inline.content "#PCDATA | a | bookref | footref | em | strong | thought | foreign | quote | cite | code | line | br | typ | onomatopoeia | spell | item | %character.content;">
 
-<!ENTITY % block.content "p | ul | ol | dl | table | blockquote | illustration | combat | choice | signpost | hr">
+<!ENTITY % block.content "p | ul | ol | dl | table | blockquote | illustration | combat | choice | signpost | hr | illref">
 
 <!ENTITY % core.attributes "
          class CDATA #IMPLIED
@@ -163,6 +181,13 @@ III. Block Elements
          valign ( top | middle | bottom | baseline )       #IMPLIED
 ">
 
+<!ENTITY % cell.scope.attributes "
+         rowspan CDATA                               #IMPLIED
+         colspan CDATA                               #IMPLIED
+         axis    CDATA                               #IMPLIED
+         scope   ( row | col | rowgroup | colgroup ) #IMPLIED
+">
+
 <!-- :::::::::::::::::::: Character Entities ::::::::::::::::::::: -->
 
 <!ENTITY lt     "&#38;#60;"><!-- left angle bracket -->
@@ -201,13 +226,13 @@ document. The data should conform to the IETF RFC1766.
 
 Examples:
 
- <gamebook version="0.11" xml:lang="en-UK">
+ <gamebook version="0.12" xml:lang="en-UK">
   <meta . . .> . . . </meta>
   <section . . .> . . . </section>
   . . .
  </gamebook>
 
- <gamebook version="0.11" > . . . </gamebook>
+ <gamebook version="0.12" > . . . </gamebook>
 
 -->
 
@@ -392,7 +417,7 @@ Examples:
 
 <!-- ::::::::::::::::::::: section Element ::::::::::::::::::::::: -->
 
-<!ELEMENT section ( meta, footnotes?, data )>
+<!ELEMENT section ( meta, footnotes?, illustrations?, data )>
 <!ATTLIST section
           %core.attributes;
           %link.attributes;
@@ -454,6 +479,54 @@ Examples:
 
 -->
 
+<!ELEMENT illustrations ( illustration | illgroup )*>
+<!ATTLIST illustrations
+          %core.attributes;
+>
+<!--
+
+The "illustrations" element represents a collection of illustrations.
+The illustrations, or illustration groups, should be listed in the
+order they appear in the book.
+
+Example:
+
+ <illustrations>
+  <illustration . . . />
+  <illgroup . . .>. . .</illgroup>
+  . . .
+ </illustrations>
+
+-->
+
+<!ELEMENT illgroup ( illustration )*>
+<!ATTLIST illgroup
+          %core.attributes;
+          %link.attributes;
+>
+
+<!--
+
+The "illgroup" element represents a group of illustrations contained
+within one section. It is used when individual links to the each
+illustration from the illustrations index are not wanted.
+
+Example:
+
+ <illgroup idref=". . .">
+  <illustration . . . />
+  <illustration . . . />
+  . . . 
+ </illgroup>
+
+ <illgroup idref=". . ." class="hidden">
+  <illustration . . . />
+  <illustration . . . />
+  . . . 
+ </illgroup>
+
+-->
+
 <!ELEMENT footnotes ( footnote )*>
 <!ATTLIST footnotes
           %core.attributes;
@@ -487,8 +560,8 @@ named anchor within the document.
 Example:
 
  <data . . .>
-  <p . . .>This paragraph requires an appropriate 
-   <a id="reference" idref="footnote-reference" . . .>footnote</a>.
+  <p . . .>This paragraph requires an appropriate footnote
+   <a id="reference" idref="footnote-reference" . . ./>.
   </p>
   . . .
  </data>
@@ -628,8 +701,9 @@ Example:
 
 <!-- :::::::::::::::::::::::::: Tables ::::::::::::::::::::::::::: -->
 
-<!ELEMENT table ( tr )*>
+<!ELEMENT table ( caption?, colgroup*, thead?, tfoot?, ( tr+ | tbody+ ))>
 <!ATTLIST table
+          summary CDATA #IMPLIED
           %core.attributes;
 >
 <!--
@@ -647,6 +721,115 @@ Example:
 
 -->
 
+<!ELEMENT caption ( %inline.content; )*>
+<!ATTLIST caption
+          %core.attributes;
+>
+<!--
+
+The "caption" element contains a brief description of the data
+contained in the table and the structure of the table.
+
+Example:
+
+ <table>
+  <caption>Random Number Table</caption>
+  . . .
+ </table>
+
+-->
+
+<!ELEMENT colgroup EMPTY>
+<!ATTLIST colgroup
+          span CDATA #REQUIRED
+>
+<!--
+
+The "colgroup" element explicitly groups several columns of tabular data
+together. The "span" attribute specifies the number of columns to be
+grouped. This is primarily useful for non-visual user agents.
+
+Example:
+
+ <table>
+  . . .
+  <colgroup span="1"/>
+  <colgroup span="13"/>
+  . . .
+ </table>
+
+-->
+
+<!ELEMENT thead ( tr+ )>
+<!ATTLIST thead
+          %core.attributes;
+>
+<!--
+
+The "thead" element contains rows of data designated as the table
+header. It creates a rowgroup for the purposes of the "scope"
+attribute in the "th" and "td" elements.
+
+Example:
+
+ <table>
+  . . .
+  <thead>
+   <tr . . .> . . . </tr>
+   . . .
+  </thead>
+  . . .
+ </table>
+
+-->
+
+<!ELEMENT tfoot ( tr+ )>
+<!ATTLIST tfoot
+          %core.attributes;
+>
+<!--
+
+The "tfoot" element contains rows of data designated as the table
+footer. It creates a rowgroup for the purposes of the "scope"
+attribute in the "th" and "td" elements.
+
+Example:
+
+ <table>
+  . . .
+  <tfoot>
+   <tr . . .> . . . </tr>
+   . . .
+  </tfoot>
+  . . .
+ </table>
+
+-->
+
+<!ELEMENT tbody ( tr+ )>
+<!ATTLIST tbody
+          %core.attributes;
+>
+<!--
+
+The "tbody" element contains rows of data designated as the part
+of the main table data. More than one "tbody" element is allowed per
+"table" element. It creates a rowgroup for the purposes of the "scope"
+attribute in the "th" and "td" elements.
+
+Example:
+
+ <table>
+  . . .
+  <tfoot>
+   <tr . . .> . . . </tr>
+   . . .
+  </tfoot>
+  . . .
+ </table>
+
+-->
+
 <!ELEMENT tr ( th | td )*>
 <!ATTLIST tr
           %core.attributes;
@@ -674,12 +857,17 @@ Example:
 <!ATTLIST th
           %core.attributes;
           %cell.align.attributes;
+          %cell.scope.attributes;
 >
 <!--
 
 The "th" contains a table header used to label a particular row or 
 column of tabular data.
 
+The "scope" attribute specifies to what extent the data of this header
+applies. The "axis" attribute is a comma-separated list of categories
+to which the element belongs.
+
 Example:
 
  <tr . . .>
@@ -696,11 +884,17 @@ Example:
 <!ATTLIST td
           %core.attributes;
           %cell.align.attributes;
+          %cell.scope.attributes;
 >
 <!--
 
 The "td" element contains one cell of tabular data.
 
+The "scope" attribute may be used in conjunction with a "td" element to
+specify that though its data isn't considered header data, it functions
+as a label for the data. For example, a character's name is a label for a row
+of the character's statistics, but it is not a header.
+
 Example:
 
  <tr . . .>
@@ -902,6 +1096,27 @@ Example:
 
 -->
 
+<!ELEMENT illref EMPTY>
+<!ATTLIST illref
+          %core.attributes;
+          %link.attributes;
+>
+
+<!--
+
+The "illref" element is used to mark the location of an illustration.
+The actual illustration is declared elsewhere.
+
+Since the placement of a particular illustration may depend on the
+output format, one "illref" is required for each format.
+
+Example:
+
+  <illref idref="ill2" class="html"/>
+  <illref idref="ill2" class="pdf"/>
+
+-->
+
 <!ELEMENT signpost ( %inline.content; | %block.content; )*>
 <!ATTLIST signpost
           %core.attributes;
@@ -966,6 +1181,8 @@ Example:
 <!ELEMENT bookref ( %inline.content; )*>
 <!ATTLIST bookref
           %core.attributes;
+          %link.attributes;
+          series  CDATA #IMPLIED
           book    CDATA #REQUIRED
           section CDATA #IMPLIED
 >
@@ -974,22 +1191,33 @@ Example:
 The "bookref" element is used to contain inline content that should be a 
 hypertext anchor to another book.
 
+The "series" attribute is a tag that denotes the series of the book that
+the link points to. The attribute may be left out if the book is part of
+the same series as the one containing the link.
+
 The "book" attribute is a tag that denotes the book that the link points
 to. This is not necessarily a URL.
 
 The "section" attribute is a tag indicating which section to link to.
-This is not necessarily a URL.
+This is not necessarily a URL. The attribute may be left out if no
+particular section is referred to.
 
 Example:
 
  <p . . .>
   . . .
-  <bookref book="11tpot" id="sect33">
+  <bookref series="lw" book="11tpot" section="sect33">
    The Prisoners of Time: Section 33
   </bookref>
   . . .
  </p>
 
+ <p . . .>
+  . . .
+  <bookref book="04wotw">Book 4</bookref>
+  . . .
+ </p>
+
 -->
 
 <!ELEMENT footref ( %inline.content; )*>
@@ -1000,7 +1228,7 @@ Example:
 <!--
 
 The "footref" element is used to indicate the position of a reference
-to a "footnote" element.
+to a "footnote" element. It should normally not contain any text.
 
 Example:
 
@@ -1133,21 +1361,39 @@ Example:
 
 -->
 
+<!ELEMENT line ( %inline.content; )*>
+<!ATTLIST line
+          %core.attributes;
+>
+<!--
+
+The "line" element contains one logical line of data in, for example,
+a poem. Its use should be confined to documents such as poems that
+require a particular line structure.
+
+Example:
+
+ <line>When the full moon rises o'er the temple deep,</line>
+ <line>A sacrifice will stir from sleep</line>
+ <line>The legions of a long forgotten lord.</line>
+
+-->
+
 <!ELEMENT br EMPTY>
 <!ATTLIST br
           %core.attributes;
 >
 <!--
 
-The "br" indicates a required line break. Its use should be confined 
-to documents such as poems that require a particular line structure.
+The "br" indicates a required line break. Its use is deprecated in favor
+of the "line" element.
 
 Example:
 
  <blockquote . . .>
   . . .
   There once was a Kai monk from Sommerlund<br />
-  Who always wore a cummerbund<br />
+  Who always wore a pink cummerbund<br />
   . . .
  </blockquote>
 
@@ -1587,7 +1833,7 @@ DTD. For current practice, please refer to published XML files.
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE gamebook SYSTEM "gamebook.dtd">
 
-<gamebook version="0.11" xml:lang="en-UK">
+<gamebook version="0.12" xml:lang="en-UK">
 
 <meta>
  <title>Flight from the Dark</title>