<!--

Title:      SimpleBook Document DTD
Version:    1.0 (preliminary draft)
Date:       08 December 2006
DTD-URL:    http://openreader.org/dtd/sbd10.dtd
Reference:  (in preparation)
RefURL:     n.a.
Rights:     Copyright 2006 OpenReader Consortium. All rights reserved.


Contributors:

     Jon Noring (editor)


Usage (prolog boilerplate, root level, and minimally required
<bookinfo>. Comments in "<!==...==>" must be removed)

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE simplebook PUBLIC
     "-//OpenReader//DTD SimpleBook Document 1.0//EN"
     "http://openreader.org/dtd/sbd10.dtd">

<simplebook xmlns="http://openreader.org/namespace/simplebook/1.0/"
            lang="en-US">

   <bookinfo>

      <booktitle>Book Title Goes Here</booktitle>

      <creator role="aut">Creator name goes here</creator>

      <!== more metadata can optionally be added. For above <creator>,
           the required 'role' attribute value may differ from the
           value of "aut". There are other attributes which may be
           added to all the elements in this template. ==>

   </bookinfo>

   <!== block-level content goes here ==>

</simplebook>

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     Usage Notes:

     1. The encoding in the XML declaration must be specified, and
        must either be 'UTF-8' or 'UTF-16'. The above example
        template has been set to 'UTF-8', which is recommended for
        all Western languages/character sets. (Note that pure ASCII
        conforms to UTF-8.)

     2. The default namespace in the <simplebook> element must be
        specified, even though declared FIXED in this DTD.

     3. 'lang' is required, and its value must be conformant to RFC
        3066. It specifies the language-country code of the contents.

        The above example template gives the language-country code
        value of 'en-US', which is United States English.

     4. Refer to the comment in the <bookinfo> section.


Early Draft Notice:

     This DTD is a very preliminary release. As such it will
     undoubtedly change in many ways, including, but not limited to,
     renaming of elements and attributes, addition and removal of
     elements and attributes, and changing of element content models,

-->

<!-- ENTITIES WITH XHTML DATATYPE NOTATIONS ............ -->

<!NOTATION text
    PUBLIC "-//W3C//NOTATION XHTML Datatype: Text//EN">
<!ENTITY % Text.datatype "CDATA">

<!NOTATION languageCode
    PUBLIC "-//W3C//NOTATION XHTML Datatype: LanguageCode//EN">
<!ENTITY % LanguageCode.datatype "NMTOKEN">
<!-- Language code, as per [RFC 3066] -->

<!NOTATION uri
    PUBLIC "-//W3C//NOTATION XHTML Datatype: URI//EN">
<!ENTITY % URI.datatype "CDATA">
<!-- Internationalized Resource Identifiers (see RFC 3987) -->


<!-- ELEMENT ENTITIES .................................. -->

<!ENTITY % Title.class
     "(parttitle | chaptitle | sectitle | subsectitle), subtitle?">

<!-- There are three levels of titles (along with a "parttitle")
     which imply hierarchical structure or divisions. They are
     equivalent to XHTML headers:

     The main division is <chaptitle>, to be applied to chapters (or
     similar top level major divisions) and front matter and end
     matter divisions like foreword, introduction, conclusion, etc.
     All books will use <chaptitle> except for those where there are
     no structural divisions at all in the book.

     <parttitle> is used ONLY to bundle chapters (when the author
     calls for this), and in presentation is often called "Part" or
     "Book" (e.g., "Book 1").  <parttitle> is used only when the book
     author has decided to collect chapters together under a common
     header. (However, *importantly* note that sometimes the author
     will call a chapter-level division a "Book" or "Part" without
     bundling any subdivisions. In this case, use <chaptitle> even if
     the headers say "Part" or "Book".)

     <sectitle> and <subsectitle> are finer divisions within
     <chaptitle>. In fiction and similar simpler non-fiction books
     these are used only rarely. One more often sees finer divisions,
     and sometimes even more levels, in legal and technical
     documentation.
-->

<!ENTITY % Blocknoimage.class
     "(%Title.class;, epigraph-chap?) |
      (p, themebreak?) |
       quote |
       list |
       verse |
       banner |
       letter |
       closer |
       ending">

<!ENTITY % Block.class
     "%Blocknoimage.class; | imageblock">

<!ENTITY % Inline.class
     "code | distinct | foreign | ling-emph | ling-emph-strong |
      link | noteref | other | sub | sup | title | word-as-word">

<!ENTITY % Inlinenolink.class
     "code | distinct | foreign | ling-emph | ling-emph-strong |
      noteref | other | sub | sup | title | word-as-word">

<!-- ATTRIBUTE ENTITIES ................................ -->

<!ENTITY % Common.attrib
     "id            ID                       #IMPLIED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED">

<!-- 'id' attribute applies an identifier to an element. Useful
     for internal and external hypertext linking.

     'lang' attribute assigns the language and optional country
     code to the contained content. It is required for the root
     element <simplebook>, specifying the language and country code
     of the publication. The value of the 'lang' attribute must
     comply with RFC 3066:

        RFC 3066:       http://www.ietf.org/rfc/rfc3066.txt
        Language codes: http://www.loc.gov/standards/iso639-2/php/code_list.php
        Country codes:  http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html

     For example, the conforming language-country code for U.S.
     English is "en-US":  lang="en-US"

     The 'pubcomment' and 'privcomment' attributes allow the
     publication author to add an annotation or comment to an element.
     'pubcomment' is similar to the XHTML 'title' attribute, and when
     a SimpleBook document is transformed to XHTML or other vocabulary
     which supports 'title' or its equivalent, the value of 'pubcomment'
     should be preserved. 'privcomment', on the other hand, is intended
     for internal use purposes. Transformation of SimpleBook docs into
     other XML documents must not preserve/transfer the value of
     'privcomment'.
-->


<!-- CHARACTER ENTITY REFERENCES COMMON SET 1.0 ........ -->

<!ENTITY % ORPCharEnt
     PUBLIC "-//OpenReader//DTD Character Entities 1.0//EN"
    "http://openreader.org/dtd/ent10.ent">

%ORPCharEnt;

<!-- The OpenReader Character Entity References Common Set, version
     1.0, is usable in SimpleBook documents. It is identical to the
     set supported in XHTML (plus the five predefined entity
     references in XML.)
-->


<!-- BLOCK LEVEL ELEMENTS AND ATTRIBUTES ............... -->


<!-- Block Elements Containing Block Level Elements .... -->

<!ELEMENT simplebook       (bookinfo,
                            (imageblock | epigraph-book | dedication)*,
                            (%Blocknoimage.class;),
                            (%Block.class;)*,
                            notes?,
                            glossary?)>
<!ATTLIST simplebook
      id            ID                       #IMPLIED
      lang          %LanguageCode.datatype;  #REQUIRED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      xmlns         %URI.datatype;           #FIXED 'http://openreader.org/namespace/simplebook/1.0/'>

<!-- <simplebook> is the root element. The attribute 'lang' is
     required as noted elsewhere in this DTD. 'xmlns' is the
     namepspace declaration. Although "FIXED", the namespace
     declaration must appear in all SimpleBook documents.
-->

<!ELEMENT bookinfo         (booktitle+,
                           creator+,
                           publisher?,
                           imprint?,
                           copyright?,
                           description?,
                           (contributor | bookdate | identifier | subject)*)>
<!ATTLIST bookinfo         %Common.attrib;>

<!-- <bookinfo> is required and contains the book's metadata/catalog
     information. The contained elements correspond to, although some
     are renamed for, many of those in the Dublin Core Metadata
     Element Set:

        http://dublincore.org/documents/dces/
-->

<!ELEMENT dedication       (p | quote | verse)+>
<!ATTLIST dedication
      %Common.attrib;
      tocitem       (yes|no)                 'no'
      toctitle      %Text.datatype;          #IMPLIED>

<!ELEMENT epigraph-book    (p | quote | verse)+>
<!ATTLIST epigraph-book
      %Common.attrib;
      tocitem       (yes|no)                 'no'
      toctitle      %Text.datatype;          #IMPLIED>

<!-- Both <dedication> and <epigraph-book> represent special
     "titleless" chapter-level divisions that may appear in the front
     matter of the book. Usually they are styled differently from
     the rest of the book, thus the need for special recognition.

     Normally these divisions are not included in a table of contents.
     If the author wishes they be included, then the author must do
     all three of the following:

        1. set the 'id' to some value,
        2. set 'tocitem="yes"' and
        3. include some text for the attribute 'toctitle' which will
           be used to assign some title to the table of contents item.

     If these three requirements are not all met, reading systems are
     not required to include these divisions in a table of contents if
     it builds one.
-->

<!ELEMENT epigraph-chap    (p | quote | verse)+>
<!ATTLIST epigraph-chap    %Common.attrib;>

<!-- According to TEI, an epigraph "contains a quotation, anonymous or
     attributed, appearing at the start of a section or chapter, or on
     a title page."

     The "book" type of epigraph applies to the whole book (i.e., it'd
     be seen on the title page). The "chap" type applies to any one
     of the book divisions (part, chapter, section, subsection, etc.)
     supported in SimpleBook (and not only for the chapter level.)
     If present, it must always appear after the division title(s)
     and before the start of the actual content of the division (the
     start is usually a paragraph.)
-->

<!ELEMENT quote            (p |
                            quote |
                            list |
                            banner |
                            verse |
                            letter |
                            closer)+>
<!ATTLIST quote            %Common.attrib;>

<!-- note that <quote> is analogous to XHTML <blockquote>, but not quite
     as expansive of a content model.
-->

<!ELEMENT list             (listitem)+>
<!ATTLIST list
      %Common.attrib;
      ordered       (yes|no)                 'no'>

<!-- 'ordered' specifies whether the list is ordered ('yes') or
     unordered ('no' == the default). Unordered is similar to
     XHTML <ul>, while an ordered list is similar to XHTML <ol>.
     CSS may be used to refine the presentation of the list item
     glyphs.
-->

<!ELEMENT listitem         (p | quote | list | verse)+>
<!ATTLIST listitem         %Common.attrib;>

<!ELEMENT verse            (versetitle?, verseauthor?, stanza)+>
<!ATTLIST verse            %Common.attrib;>

<!-- <verse> is a block of verse, such as part or whole of a poem,
     song lyrics, etc. A verse is divided into one or more <stanza>,
     and each <stanza> contains one or more <verseline>. One
     <versetitle> and/or one <verseauthor> may appear before the first
     stanza.
-->

<!ELEMENT stanza           (verseline)+>
<!ATTLIST stanza           %Common.attrib;>

<!-- <stanza> represents a stanza in a verse block. -->

<!ELEMENT banner           (p | quote | list | verse)+>
<!ATTLIST banner           %Common.attrib;>

<!-- <banner> is often used in fiction to show the text on
     a sign or bill. Example:

     "Mary approached the door. On the door was the sign:

          Dr. John H. Doe

     She opened the door and went in."

-->

<!ELEMENT letter           (opener,
                           (p | quote | list | verse)+,
                           closer)>
<!ATTLIST letter           %Common.attrib;>

<!-- <letter> represents a letter, memo or similar type of written
     communication, a common device used in fiction. A letter consists
     of an <opener>, which may include one or more <dateline> and
     possibly some type of salutation (like "Dear John"), the body of
     the letter, and a <closer>, typically of the form <salute> (like
     "yours truly,"), <signed>, and possibly one or more <dateline>.
-->

<!ELEMENT opener           (dateline*,salute?)>
<!ATTLIST opener           %Common.attrib;>

<!-- <opener> is similar to that in TEI, used here to designate an
     opener for <letter>. It must only appear within <letter>, unlike
     <closer>, which besides appearing in <letter> may also appear as
     a child of <simplebook>.
-->

<!ELEMENT closer           (signed | dateline | salute)*>
<!ATTLIST closer           %Common.attrib;>

<!-- <closer> is similar to that used in TEI to designate a
     closing "signature block" or similar, such as for a
     foreword. It is also used within a <letter>.
-->

<!ELEMENT ending           (p)+>
<!ATTLIST ending           %Common.attrib;>

<!-- <ending> is for endings to chapters/sections, or to the book,
     such as for enclosing the ubiquitous "The End". It may contain
     one or more paragraphs. In TEI, the equivalent element is
     <trailer>, but unlike <trailer> which essentially contains
     content, <ending> is more descriptive and may only contain one or
     more paragraphs/lines.
-->

<!ELEMENT notes            (notestitle?,
                            notescommentary?,
                            note+)>
<!ATTLIST notes
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      tocitem       (yes|no)                 'yes'
      toctitle      %Text.datatype;          #IMPLIED>

<!-- <notes> is an optional block. When used, it must contain one or
     more notes. It must be given an 'id'.

     <notes> may contain a <notestitle> (e.g. "Referenced Notes")
     which is of the same structural level and purpose as a
     <chaptitle>, and must be rendered when present. <notes> may also
     contain a <notescommentary> (which must appear after <notestitle>
     when <notestitle> is present), which adds an explanation of the
     note or notes which follow. <notescommentary> must be rendered
     when present.

     By default (with 'tocitem="yes"'), the <notes> block is to appear
     in a reading system generated table of contents. In this case
     (that is, 'tocitem' is set to "yes"), if <notestitle> is not
     provided, then a publication author MUST provide a suitable title
     using 'toctitle'. When <notestitle> is provided, and 'toctitle'
     is also assigned, the table of contents must use the 'toctitle'
     value, but may also allow the end-user to see the full
     <notestitle>.

     The SimpleBook publication author must not use a <chaptitle> or
     other division level title element immediately preceding the
     <notes> block in order to identify it. This is the role of
     <notestitle>. This particular restriction is difficult to enforce
     by DTD, thus is specially noted here. SimpleBook "conformance
     checkers" should check for this.
-->

<!ELEMENT notestitle       (#PCDATA | %Inline.class;)*>
<!ATTLIST notestitle       %Common.attrib;>

<!-- <notestitle> is an optional chapter-level title for the <notes>
     block. It is intended to be rendered. Unlike the other division
     level title elements, an 'id' is not required since that must be
     applied to the parent <notes> element immediately preceding it.
-->

<!ELEMENT notescommentary  (p)+>
<!ATTLIST notescommentary  %Common.attrib;>

<!-- <notescommentary> must contain one or more paragraphs which provide
     a commentary or explanation of the note or notes in the <notes>
     block. It is intended to be rendered.
-->

<!ELEMENT note             (notemark?, (p | quote | list | verse)+)>
<!ATTLIST note
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED>

<!-- Every note in the <notes> block must include an 'id', and must
     include at least one of the supported block-level elements.

     However, as noted for the <noteref> element, a note does not
     require a link by <noteref>.
-->

<!ELEMENT glossary         (glossarytitle?,
                            glossarycommentary?,
                            gloss+)>
<!ATTLIST glossary
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      tocitem       (yes|no)                 'yes'
      toctitle      %Text.datatype;          #IMPLIED>

<!-- <glossary> is an optional block that may appear at the end of
     the publication. When used, it must contain one or more <gloss>
     (a gloss is a term/definition pair.) It must be given an 'id'.

     <glossary> may contain a <glossarytitle> (e.g. "Definition of
     Terms Used In This Book") which is of the same structural level
     and purpose as a <chaptitle>, and must be rendered when present.

     <glossary> may also contain a <glossarycommentary> (which must
     appear after <glossarytitle> when <glossarytitle> is present),
     which adds an explanation of the term/definitions which follow.
     <glossarycommentary> must be rendered when present.

     By default (with 'tocitem="yes"'), the <glossary> block is to
     appear in a reading system generated table of contents. In this
     case (that is, 'tocitem' is set to "yes"), if <glossarytitle> is
     not provided, then a publication author MUST provide a suitable
     title using 'toctitle'. When <glossarytitle> is provided, and
     'toctitle' is also assigned, the table of contents must use the
     'toctitle' value, but may also allow the end-user to see the full
     <glossarytitle>.

     The SimpleBook publication author must not use a <chaptitle> or
     other division level title element immediately preceding the
     <glossary> block in order to identify it. This is the role of
     <glossarytitle>. This particular restriction is difficult to
     enforce by DTD, thus is specially noted here. SimpleBook
     "conformance checkers" should check for this.
-->

<!ELEMENT glossarytitle    (#PCDATA | %Inline.class;)*>
<!ATTLIST glossarytitle    %Common.attrib;>

<!-- <glossarytitle> is an optional chapter-level title for the
     <glossary> block. It is intended to be rendered when present.
     Unlike the other division level title elements, an 'id' is not
     required since that must be applied to the parent <glossary>
     element immediately preceding it.
-->

<!ELEMENT glossarycommentary  (p)+>
<!ATTLIST glossarycommentary  %Common.attrib;>

<!-- <glossarycommentary> must contain one or more paragraphs which
     provide a commentary or explanation of the gloss or glosses in
     the <glossary> block. It is intended to be rendered when present.
-->

<!ELEMENT gloss            (term, definition)>
<!ATTLIST gloss
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED>

<!-- Every <gloss> in the <glossary> block must include an 'id'
     attribute value. However, a <gloss> does not require it to be
     linked from elsewhere in the publication.

     A <gloss> must include one <term> and one <definition>, in that
     order.
-->

<!ELEMENT term             (#PCDATA | %Inline.class;)*>
<!ATTLIST term             %Common.attrib;>

<!-- Every <gloss> must have a <term>. -->

<!ELEMENT definition       (p |
                            quote |
                            list |
                            verse)+>

<!-- Every <gloss> must have a <definition> associated with the
     <term>. <definition> may contain any mix of <p>, <quote>, <list>,
     and <verse>.
-->

<!ELEMENT imageblock       (image, caption?)>
<!ATTLIST imageblock
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      float         (left|right|none)        'none'
      loiitem       (yes|no)                 'yes'
      loititle      %Text.datatype;          #REQUIRED>

<!-- <imageblock> is non-empty and its content contains the image and
     the optional image caption.

     'float' requests whether in visual presentation the image block
     is floated (left or right), or not floated. Default is not
     floated. This is further explained in:

        http://www.w3.org/TR/CSS21/visuren.html#propdef-float

     Note that a reading system may choose not to honor the float
     request for reasons of optimal display on the target reading
     device(s). When the image is not floated, the reading system may
     choose the alignment (e.g., left, center or right). However, the
     reading system should, when feasible, honor float and/or any CSS
     alignment instructions.

     'loiitem' states whether or not the image item is to appear in a
     reading system generated "List of Illustrations". Default is
     'yes'.

     'loititle' is the required title to use for the List of
     Illustrations as well as being the equivalent to the XHTML 'alt'
     attribute of <img> for accessibility purposes, thus it is always
     required even if 'loiitem' is set to "no". (In addition, the
     publication author should assign a title to 'pubcomment', which
     is equivalent to XHTML 'title' == it can be the same as the
     value applied to 'loititle'. If 'pubcomment' is not present,
     then conversion systems should map 'loititle' to 'pubcomment'.)

     'id' is required for enabling linking in the List of
     Illustrations, as well as for individualized CSS styling.

-->

<!ELEMENT caption          (p | quote | list | verse)+>
<!ATTLIST caption          %Common.attrib;>

<!-- <caption> is optional, containing the caption or legend
     associated with the image within an <imageblock>.
-->


<!-- Block Elements Containing Text And Inline Elements  -->

<!ELEMENT p                (#PCDATA | %Inline.class;)*>
<!ATTLIST p                %Common.attrib;>

<!ELEMENT parttitle        (#PCDATA | %Inline.class;)*>
<!ATTLIST parttitle
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      tocitem       (yes|no)                 'yes'
      toctitle      %Text.datatype;          #IMPLIED>

<!ELEMENT chaptitle        (#PCDATA | %Inline.class;)*>
<!ATTLIST chaptitle
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      tocitem       (yes|no)                 'yes'
      toctitle      %Text.datatype;          #IMPLIED>

<!ELEMENT sectitle         (#PCDATA | %Inline.class;)*>
<!ATTLIST sectitle
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      tocitem       (yes|no)                 'yes'
      toctitle      %Text.datatype;          #IMPLIED>

<!ELEMENT subsectitle      (#PCDATA | %Inline.class;)*>
<!ATTLIST subsectitle
      id            ID                       #REQUIRED
      lang          %LanguageCode.datatype;  #IMPLIED
      pubcomment    %Text.datatype;          #IMPLIED
      privcomment   %Text.datatype;          #IMPLIED
      tocitem       (yes|no)                 'yes'
      toctitle      %Text.datatype;          #IMPLIED>

<!-- 'tocitem' for the various header titles states whether or not the
     header is to appear in a reading system generated table of
     contents. Default is 'yes'.

     'toctitle' is the title to use for the table of contents; if
     'toctitle' is not present, the full content of the header is
     to be used.

     'id' is required for table of contents linking purposes and for
     general third-party linking.
-->

<!ELEMENT subtitle         (#PCDATA | %Inline.class;)*>
<!ATTLIST subtitle         %Common.attrib;>

<!ELEMENT versetitle       (#PCDATA | %Inline.class;)*>
<!ATTLIST versetitle       %Common.attrib;>

<!ELEMENT verseauthor      (#PCDATA | %Inline.class;)*>
<!ATTLIST verseauthor      %Common.attrib;>

<!-- For info on <versetitle> and <verseauthor>, refer to the
     comment for <verse>
-->

<!ELEMENT verseline        (#PCDATA | %Inline.class;)*>
<!ATTLIST verseline
      %Common.attrib;
      indent        (0|1|2|3|4|5|6)          '0'>

<!-- 'indent' assigns a requested amount of indentation for the
     verseline when visually presented. Default is '0', meaning no
     indentation with respect to the containing stanza block box. This
     specification does not define the exact amount of indentation for
     each integer value, since optimum presentation is
     device-dependent.
-->

<!ELEMENT signed           (#PCDATA | %Inline.class;)*>
<!ATTLIST signed           %Common.attrib;>

<!ELEMENT dateline         (#PCDATA | %Inline.class;)*>
<!ATTLIST dateline         %Common.attrib;>

<!ELEMENT salute           (#PCDATA | %Inline.class;)*>
<!ATTLIST salute           %Common.attrib;>

<!-- <signed>, <dateline> and <salute> are similar to those used in
     TEI.
-->

<!ELEMENT notemark         (#PCDATA | %Inline.class;)*>
<!ATTLIST notemark         %Common.attrib;>


<!-- The <bookinfo> block level elements for metadata/catalog
     information. Some are required, see the <bookinfo> comment
     content model. They map to Dublin Core Metadata Elements as
     noted.
-->

<!ELEMENT bookdate         (#PCDATA | %Inline.class;)*>
<!ATTLIST bookdate
      %Common.attrib;
      event         %Text.datatype;          #REQUIRED>

<!-- <bookdate> designates the date/time for an important event in the
     life-cycle of the book, such as the publishing date. There may be
     any number of <bookdate> elements to cover multiple events.
     Equivalent to Dublin Core 'date'.

     The character data expressing the date/time of the event must
     conform to the W3C Note Date and Time Formats. For example, a
     full date (with no time) must be of the form YYYY-MM-DD (e.g.,
     "2006-05-29"). See:

        http://www.w3.org/TR/NOTE-datetime

     The required attribute 'event' assigns a name to the event. The
     set of values for the event attribute are not defined in this
     specification. Possible values may include: 'creation',
     'publication', and 'modification'.
-->

<!ELEMENT booktitle        (#PCDATA | %Inline.class;)*>
<!ATTLIST booktitle        %Common.attrib;>

<!-- <booktitle>, which is required, includes the title of the book.
     There may be more than one line to a book title (e.g. a title/
     subtitle), so multiple <booktitle> are used, which must be
     sequential and order is important. It is equivalent to Dublin
     Core 'title'.
-->

<!ELEMENT contributor      (#PCDATA | %Inline.class;)*>
<!ATTLIST contributor
      %Common.attrib;
      role          NMTOKENS                 #REQUIRED
      file-as       %Text.datatype;          #IMPLIED>

<!-- <contributor>, the name of a person or entity who contributed to
     the production of the book, but not at the level of a <creator>.
     Equivalent to Dublin Core 'contributor'. See the note for
     <creator> for more information, including the supported attribute
     set.
-->

<!ELEMENT copyright        (#PCDATA | %Inline.class;)*>
<!ATTLIST copyright        %Common.attrib;>

<!-- <copyright> includes information about the various rights, not
     limited to copyright, held in and over the book. Equivalent to
     Dublin core 'rights'.
-->

<!ELEMENT creator          (#PCDATA | %Inline.class;)*>
<!ATTLIST creator
      %Common.attrib;
      role          NMTOKEN                  #REQUIRED
      file-as       %Text.datatype;          #IMPLIED>

<!-- The elements <creator> (required) and <contributor> (optional)
     designate the name of a person or entity responsible for some
     recognized role in the process to author the content of the
     Publication. <creator> is used for those who played a primary or
     major role, while <contributor> is used for those who played a
     secondary, supporting or minor role. To illustrate the
     difference, those whose name is intended to appear on a title
     page are creators, while all others are contributors. A book may
     have multiple creators and contributors.

     In the event the <creator> for the book is not known or cannot
     be given, for the content use some descriptor like "Unknown",
     "Anonymous", etc.

     <creator> is equivalent to Dublin Core 'creator'.

     Both elements support the same attributes besides the Common
     attributes:

     'role' (required): a role value conforming to the requirements
                        (with one exception described below) given in
                        the OpenReader Binder spec, Section 4.5.5.,
                        for full information:

                           http://www.openreader.org/spec/bnd10.html#sec4.5.5

                        (Exception: The OpenReader Binder allows
                        multiple role values in the 'role' attribute.
                        This spec allows only one. If a person or
                        entity has more than one role, use a separate
                        <creator> for each role.)

                        Examples:

                           role="aut"   (for an author)
                           role="ill"   (for an illustrator)
                           role="trl"   (for a translator)

     'file-as' (optional): used to specify a normalized form of the
                           character data, suitable for machine
                           processing, such as for sorting by a
                           person's last name.

     Example:

        <creator role="aut" file-as="Doe, John">John Doe</creator>
-->

<!ELEMENT description      (#PCDATA | %Inline.class;)*>
<!ATTLIST description      %Common.attrib;>

<!-- <description> is a single paragraph description or account of the
     book, useful for marketing, cataloging, etc. Equivalent to Dublin
     Core 'description'.
-->

<!ELEMENT identifier       (#PCDATA | %Inline.class;)*>
<!ATTLIST identifier
      %Common.attrib;
      idns          NMTOKEN                  #REQUIRED
      ver           (1|2|3|4|5|6|7|8|9|10)   #REQUIRED>

<!-- <identifier>, which is optional but recommended, contains an
     identifier to the SimpleBook version of the book. Although this
     specification does not designate the namespaces from which the
     identifier must be drawn, it is highly recommended it be a UUID
     since UUIDs are free, globally unique, and easily generated using
     online services (there are even registration services), but the
     identifier could also be an ISBN == see the OpenReader Binder 1.0
     specification, Section 4.3 for more information:

        http://www.openreader.org/spec/bnd10.html#sec4.3

     There may be more than one identifier, with the first being
     considered the "primary" identifier.

     The required attribute 'idns' specifies the namespace associated
     with the identifier. The required 'ver' specifies the version
     number (starting with '1' == minor changes to the book should
     increment the version number keeping the ID the same.) Both must
     conform to the requirements given in section 4.3 of the
     OpenReader Binder 1.0 specification.

     Example:

        <identifier idns="urn:uuid" ver="1">6a2014b0-87a2-11da-a72b-0800200c9a66</identifier>

     <identifier> is equivalent to Dublin Core 'identifier'.
-->

<!ELEMENT imprint          (#PCDATA | %Inline.class;)*>
<!ATTLIST imprint          %Common.attrib;>

<!-- See note for <publisher>. Mappable to Dublin Core 'publisher' -->

<!ELEMENT publisher        (#PCDATA | %Inline.class;)*>
<!ATTLIST publisher        %Common.attrib;>

<!-- <publisher>, and the related <imprint>, designates the entity
     responsible for making the resource available. <imprint> is
     usually a marketing "arm" for a publisher. Both are equivalent
     to Dublin core 'publisher'.
-->

<!ELEMENT subject          (#PCDATA | %Inline.class;)*>
<!ATTLIST subject
      %Common.attrib;
      scheme        %Text.datatype;          #REQUIRED>

<!-- <subject>, which is optional, may occur any number of times to
     apply multiple subjects. The content designates the subject or
     topic keywords for the book. Equivalent to Dublin Core 'subject',
     which says the following about 'subject':

        "Typically, Subject will be expressed as keywords, key phrases
        or classification codes that describe a topic of the resource.
        Recommended best practice is to select a value from a
        controlled vocabulary or formal classification scheme."

     The required 'scheme' attribute designates the scheme for the
     associated subject. If the subject is drawn from either the
     Library of Congress Subject Headings, or is a Library of Congress
     Control Number, the value of 'scheme' should be 'lcsh' or 'lccn',
     respectively.

     Examples:

        <subject scheme="lcsh">Nebraska-+-Fiction.</subject>

        <subject scheme="lccn">PS3505.A87</subject>

        <subject scheme="my-own">Fiction:Nebraska</subject>
-->

<!-- Note that all the above <bookinfo> elements may contain the
     inline elements for direct rendering purposes, such as for
     generating title and/or copyright pages. However, note that
     translation of this metadata into other formats may strip away
     the inline elements and leave the bare text. The SimpleBook
     publication author should make sure the text sans inline elements
     is reasonably acceptable. For example, subscripted and
     superscripted characters will translate to default non-offset
     characters.
-->

<!-- Block Elements Which Are Empty .................... -->

<!ELEMENT image            EMPTY>
<!ATTLIST image
      %Common.attrib;
      href          %URI.datatype;           #IMPLIED
      source        %URI.datatype;           #REQUIRED>

<!-- 'source' references the image, which must be either PNG or JPEG.
     When a PNG, the filename suffix must be ".png". When JPEG, the
     filename suffix must be ".jpg" or ".jpeg".

     SVG and JPEG 2000 support may be added in the future.

     'href' may be used to add a hypertext link to the image (since
     <link> won't work here.) 'href', like that for <link> may
     reference either internally or externally to the document.
-->

<!ELEMENT themebreak       EMPTY>
<!ATTLIST themebreak       %Common.attrib;>

<!-- <themebreak> inserts a break a theme or story break between
     paragraphs. In visual presentation, such a break is either
     shown as extra space between the paragraphs, or includes a
     dingbat. CSS may be used to insert the extra space or embed
     a dingbat graphic.

     A <themebreak> must not be inserted for purposes other than a
     theme/story break within a section. Thus, it must not appear
     immediately preceding a structural title element.

     Note that because of potential abuse, a <themebreak> may only
     occur after a <p>, both of which are children of <simplebook>.
     This strict requirement may be relaxed at a future time if
     there is deemed a need for relaxation.
-->


<!-- INLINE LEVEL ELEMENTS ............................. -->


<!ELEMENT ling-emph        (#PCDATA | %Inline.class;)*>
<!ATTLIST ling-emph        %Common.attrib;>

<!ELEMENT ling-emph-strong (#PCDATA | %Inline.class;)*>
<!ATTLIST ling-emph-strong %Common.attrib;>

<!-- <ling-emph> and <ling-emph-strong> are for mild and
     strong linguistic/rhetorical emphasis, respectively -->

<!ELEMENT title            (#PCDATA | %Inline.class;)*>
<!ATTLIST title            %Common.attrib;>

<!-- <title> is used for:

     a) longer standalone work: book, magazine, newspaper, movie,
        play, poem, opera, and long musical composition; etc.

     b) name of a ship, boat, plane, etc.

     c) parties in a lawsuit

     d) the various levels of Linnaean taxonomy, such as genera and
        species names

     e) anything else "title-related" or "name-related" that is not
        covered by the other inline semantic elements and which is
        wanted to be highlighted during visual presentation.

     The default visual presentation per the Chicago Manual of Style
     (CMOS) is italics.

     Note: Also, according to CMOS, the title of an article or chapter
           within a work, and the title of a short work such as a
           song, is to be enclosed in double quotes and not use any
           highlighting. This spec does not define a tag for this
           purpose, and <title> should not be used for such items
           except where the convention in the primary language-country
           supports doing so.
-->

<!ELEMENT foreign          (#PCDATA | %Inline.class;)*>
<!ATTLIST foreign          %Common.attrib;>

<!-- Use this to indicate a word or phrase is in a language other than
     the primary language of the publication as defined by 'lang'
     applied to the root element. It is recommended that 'lang' be
     applied to this element when used.

     However, don't use <foreign> for foreign words or phrases which
     have become commonly used in the primary language, such as "et
     cetera" in English.

     Default visual presentation is italics.

     Alternatively, 'lang' may be applied to any supported element to
     define the language of the contents, but in this case the default
     visual presentation is that for the element.
-->

<!ELEMENT distinct         (#PCDATA | %Inline.class;)*>
<!ATTLIST distinct         %Common.attrib;>

<!-- TEI4 (section 6.3.2.3) http://www.tei-c.org/P4X/CO.html#COHQHD
     says the following about this element, and provides examples:

     "identifies any word or phrase which is regarded as
     linguistically distinct, for example as archaic, technical,
     dialectal, non-preferred, etc., or as forming part of a
     sublanguage."

     Note the distinction with <foreign> as described in the TEI4
     section. Default visual rendering is italic.
-->

<!ELEMENT link             (#PCDATA | %Inlinenolink.class;)*>
<!ATTLIST link
      %Common.attrib;
      href          %URI.datatype;           #REQUIRED
      hiddenlink    (yes|no)                 'no'>

<!-- <link>, which is inline, adds a hypertext link to a word or
     phrase. It must not contain another <link> to any depth of
     nesting.

     The required attribute 'href' assigns the target URI/IRI. The
     target may be either internal or external.

     The attribute 'hiddenlink' requests that during presentation the
     link is not highlighted as a link by the reading system. The
     default is "no" meaning "not hidden". (NOTE: In rendering,
     'hiddenlink', when set to "yes", must not alter any styling
     applied by CSS to other elements containing the same content.)
     Hiding the link is useful, for example, in attaching a dictionary
     or encyclopedia to words in the publication where highlighting of
     the links would be a distraction to reading.

     Since this specification does not constrain how <link> is to
     be used with the other inline elements containing the same
     content (e.g., such as the order of nesting), it is important
     that CSS styling minimize any potential conflicts between <link>
     and the other inline elements. Otherwise, unpredictable results
     may occur.
-->

<!ELEMENT code             (#PCDATA | %Inline.class;)*>
<!ATTLIST code             %Common.attrib;>

<!-- Computer-related text, such as input, output, and code (this spec
     makes no distinction between them.) Default visual presentation
     is monospace font.
-->

<!ELEMENT word-as-word     (#PCDATA | %Inline.class;)*>
<!ATTLIST word-as-word     %Common.attrib;>

<!-- Word used as a word. Default visual presentation is italics.

     Example:

       <word-as-word>Animals</word-as-word> is a common word used to
       describe the species in the <title>Animalia</title> kingdom.
-->

<!ELEMENT sup              (#PCDATA | %Inline.class;)*>
<!ATTLIST sup              %Common.attrib;>

<!ELEMENT sub              (#PCDATA | %Inline.class;)*>
<!ATTLIST sub              %Common.attrib;>

<!-- Superscript and subscript similar to the same in XHTML. -->

<!ELEMENT noteref          (#PCDATA | %Inline.class;)*>
<!ATTLIST noteref
      %Common.attrib;
      noteidref     %URI.datatype;           #REQUIRED>

<!-- Used to enclose the mark, symbol or number in the main body of
     the text pointing to the same mark, symbol or number in
     <notemark> within some <note>.

     The required 'noteidref' references the id of the associated
     <note>. However, a <note> at the end of the SimpleBook document
     does not require there be an associated <noteref>.
-->

<!ELEMENT other            (#PCDATA | %Inline.class;)*>
<!ATTLIST other
      %Common.attrib;
      type          %Text.datatype;          #REQUIRED
      vhireq        NMTOKENS                 #IMPLIED>

<!-- <other> is an inline element similar in some respects to the
     XHTML <span> element. This element must only be used to apply a
     custom semantic meaning (and optionally request special text
     styling), to an inline word or phrase. By default, CSS must not
     assign any particular visual highlighting to this element except
     when 'vhireq' is present, where CSS may, but is not required to,
     apply some or all of the requested highlighting (further
     discussed below.)

     <other> must include a 'type' attribute whose value defines the
     element's semantics. This spec does not support any specific
     values for the 'type' attribute, nor recommends any particular
     system. It should be descriptive, though.

     The attribute 'vhireq', for "visual highlighting request", may be
     applied to the <other> element. 'vhireq' is intended only for
     special and unique visual effects not covered by the standard
     semantic markup in this spec. As noted above, SimpleBook visual
     reading systems, and third-party CSS style sheets, are NOT
     REQUIRED to honor the request, either in whole or in part.

     For example, specifying 'font-red' makes no sense for displays
     which cannot display color. Or, certain reading systems may not
     be able to fulfill particular font-related requests besides
     color. It is strongly recommended 'vhireq' NOT BE USED except for
     the most unusual and controlled circumstances. And if it is used,
     the publication author should assure the text is understandable
     when 'vhireq' is not recognized/honored.

     The 'vhireq' attribute value must be a space separated list of
     one or more of the following pre-defined values (case is
     important). Values other than these MUST be ignored by all
     SimpleBook reading systems == no other values may be supported.

     bcolor-aqua    | bcolor-black  | bcolor-blue   | bcolor-fuchsia |
     bcolor-gray    | bcolor-green  | bcolor-lime   | bcolor-maroon  |
     bcolor-navy    | bcolor-olive  | bcolor-orange | bcolor-purple  |
     bcolor-red     | bcolor-silver | bcolor-teal   | bcolor-white   |
     bcolor-yellow  | bolder        | cursive       | fantasy        |
     fcolor-aqua    | fcolor-black  | fcolor-blue   | fcolor-fuchsia |
     fcolor-gray    | fcolor-green  | fcolor-lime   | fcolor-maroon  |
     fcolor-navy    | fcolor-olive  | fcolor-orange | fcolor-purple  |
     fcolor-red     | fcolor-silver | fcolor-teal   | fcolor-white   |
     fcolor-yellow  | italic        | larger        | line-through   |
     monospace      | sans-serif    | serif         | small-caps     |
     smaller        | underline     |

     Note that the above list is derived from various CSS properties:

     background-color (17 colors)
     color            (17 colors)
     font-family      (serif, sans-serif, cursive, fantasy, monospace)
     font-size        (larger, smaller)
     font-style       (italic)
     font-variant     (small-caps)
     font-weight      (bolder)
     text-decoration  (underline, line-through)

     The 17 font and background color values (prefixed with "fcolor-"
     and "bcolor-", respectively), are defined at:

        http://www.w3.org/TR/CSS21/syndata.html#value-def-color

     This spec does not, and cannot practically-speaking, specify how
     reading systems will apply the values when two or more values
     from the same CSS property appear in the same 'vhireq' list, so
     publication authors should avoid doing this as it will lead to
     unpredictable results. Also, unwanted styling may occur when
     the other inline elements are nested inside or outside of
     <other>.
-->

