<!-- $Date: 2005/01/04 12:47:47 $ Overview: doctype for novels, stories, poems, plays<br/> Version: 0.2.0<br/> Copyright: 2004 (c) Ingo Schramm<br/> License: GNU LGPL<br/> Public: -//Ister.ORG//XLDL Literature Description Language//EN<br/> System: http://xml.ister.org/dtd/xldl/xldl.dtd<br/> This file provides an XML doctype that may be useful for the storage of novels, stories, poems and related texts. In general, it may not be useful for scientific literature. The doctype is aimed to be as useful as possible and as powerful as needed. A lot of features are supported like version control, internationalization or custom treatment of selected parts of text. With XLDL you may also mark certain entities, such as acting persons, locations, times or metaphors. With a capable software, these marks may be useful to navigate through the logical structure of the document or to group and search these entities. This allows the user to treat an XLDL document like a small database. As usual with XML, this doctype reflects the semantic structure of a text. It cannot store typographical information. Please, use XSL for that purpose or transform a document with XSLT to fit for another document type (such as XHTML or FO). Changelog: <strong>0.2.0</strong><br/> added element <code><sourcelang></code><br/> added element <code><mark></code><br/> added element <code><binary></code><br/> moved element <code><holder></code> to <code><owner></code><br/> added a number of <code>id</code> attributes<br/> <strong>0.1.0</strong><br/> first production release<br/> @root opus @title XLDL Literature Description Language @hidden This document includes DTDDoc documentation. --> <!-- Define an opus. This element opens an XLDL document. Each such document is considdered to be an opus. An opus has some meta data and some contents. Additionally, an opus can have different parts in its contents such as volumes, chapters or acts. % <opus> <meta></meta> <content></content> </opus> % --> <!ELEMENT opus (meta, content)> <!-- @attr xmlns:xldl specify the XLDL namespace of an opus --> <!ATTLIST opus xmlns:xldl CDATA "http://xml.ister.org/dtd/xldl"> <!-- @attr xmlns specify the default namespace of an opus --> <!ATTLIST opus xmlns CDATA "http://xml.ister.org/dtd/xldl"> <!-- @attr class specify the class of the current opus --> <!ATTLIST opus class (books|book|article|novel|story|essay|poem|play|tragedy|comedy|radioplay|screenplay) #IMPLIED> <!-- Metadata of the current opus. This element encloses all metadata of the opus. % <meta> <title>The Wide Open</title> <author>John Gott</author> </meta> % --> <!ELEMENT meta (title, subtitle*, author*, type, copyright?, sourcelang?, dedication*, acknowledgement*, disclaimer*, slogan* )> <!-- Give the global title of the opus. If you need to store different languages of the title you may use a <text> tag inside of <title>. % <title> <text> <par xml:lang="eng">The Wide Open</par> <par xml:lang="ger">Die offene Weite</par> </text> </title> % --> <!ELEMENT title (#PCDATA | text)*> <!-- Give one or more subtitles. If you need to store different languages of one subtitle you may use a <text> tag inside of <title>. % <subtitle></subtitle> % --> <!ELEMENT subtitle (#PCDATA | text)*> <!-- Store the names of one or more authors. % <author>John Gott</author> % --> <!ELEMENT author (#PCDATA)> <!-- Specify the type of the text. While the class attribute of the <opus> tag specifies the opus in a standardized way, this tag may be used to store a more customizable specification of the text's type, usually the one the author of the text has specified. % <type>faustic novel</type> % --> <!ELEMENT type (#PCDATA)> <!-- Store information about copyrights. The copyright of a text may be reserved. This tag exists to store information about this fact. % <copyright> <year>2004</year> <owner>John Gott</owner> <text> <par>Some rights reserved.</par> <par>This work is licensed under a Creative Commons License.</par> </text> </copyright> % --> <!ELEMENT copyright (year, owner, location*, text?)> <!-- The year the copyright has been claimed. % <year>2004</year> % --> <!ELEMENT year (#PCDATA)> <!-- The owner of the copyright. % <owner>John Gott</owner> % --> <!ELEMENT owner (#PCDATA)> <!-- The location of the copyright claim. % <location>EU</location> <location>USA</location> <location>World</location> % --> <!ELEMENT location (#PCDATA)> <!-- Give the original or source language of the opus. % <sourclang>ger</sourcelang> % --> <!ELEMENT sourcelang (#PCDATA)> <!-- The opus or a part of the opus may be dedicated to someone. % <dedication>To Nora.</dedication> % --> <!ELEMENT dedication (#PCDATA)> <!-- The author or publisher may need to acknowledge someone. % <acknowledgement> <text> <par>My Brother.</par> </text> </acknowledgement> % --> <!ELEMENT acknowledgement (text)> <!-- If the publisher or the author have something to disclaim. % <disclaimer> <text> <par>Seriousness cannot be guaranteed.</par> </text> </disclaimer> % --> <!ELEMENT disclaimer (text)> <!-- There may be a slogen preceeded to the whole opus. % <slogan> <text> <par>The wide open. Nothing holy.</par> </text> <author>Bodhidarma</author> </slogan> % --> <!ELEMENT slogan (text, author*)> <!-- This tag encloses the content of the opus. % <content version="1.0" date="2004-31-12"> <text></text> </content> % If you want to store different versions of the content in one single document you must use the <code><extra></code> tag since only one <code><content></code> tag is allowed. % <content> <extra> <content version="1.0"></content> <content version="2.0"></content> </extra> </content> % --> <!ELEMENT content ( preface?, (volume+ | part+ | chapter+ | act+ | scene+ | text+ | extra*), coda?)> <!-- @attr version specify the version of the content --> <!ATTLIST content version CDATA #IMPLIED> <!-- @attr date specify the date of the content --> <!ATTLIST content date CDATA #IMPLIED> <!-- This tag includes a preface. % <preface> <title>Preface</title> <text> </par>This book is about nothing.</par> </text> </preface> % --> <!ELEMENT preface (title?, subtitle*, (chapter+ | text+ | extra*))> <!-- @attr id specify a unique id --> <!ATTLIST preface id ID #IMPLIED> <!-- This tag stores any type of text. The <code><text></code> tag encloses nearly any type of text. It can be used in a huge number of different tags that define special structural semantics. % <text> <par>A one line poem.</par> <poetize> <stanza> <line>Little Little Line lived long, alas, by wine.</line> </stanza> </poetize> </text> % --> <!ELEMENT text ((par+ | poetize+ | extra*), footnote*)> <!-- @attr id specify a unique id --> <!ATTLIST text id ID #IMPLIED> <!-- Open a volume of a huge opus. % <opus> <volume number="1"> <title>Volume One</title> </volume> <volume number="2"> <title>Volume Two</title> </volume> </opus> --> <!ELEMENT volume (title?, subtitle*, dedication?, slogan?, preface?, (part+ | chapter+ | extra*), coda?)> <!-- @attr id specify a unique id --> <!ATTLIST volume id ID #IMPLIED> <!-- @attr number the number of the volume --> <!ATTLIST volume number CDATA #IMPLIED> <!-- Open a part of e.g. an opus or volume. % <volume number="1"> <part number="1"> <title>The Drunken Duke</title> </part> <part number="2"> <title>Police and Thiefs</title> </part> </volume> % --> <!ELEMENT part (title?, subtitle*, dedication?, slogan?, (chapter+ | extra*))> <!-- @attr id specify a unique id --> <!ATTLIST part id ID #IMPLIED> <!-- @attr number the number of the part --> <!ATTLIST part number CDATA #IMPLIED> <!-- Define a chapter. % <content> <chapter number="1"> <title>Chapter I</title> </chapter> <chapter number="2"> <title>Chapter II</title> </chapter> </content> % --> <!ELEMENT chapter ( title?, subtitle*, dedication?, slogan?, (section+ | text+ | extra*))> <!-- @attr id specify a unique id --> <!ATTLIST chapter id ID #IMPLIED> <!-- @attr number the number of the chapter --> <!ATTLIST chapter number CDATA #IMPLIED> <!-- Define a section. % <content> <chapter number="1"> <title>Chapter I</title> <section number="1"> <title>1.</title> </section> <section number="2"> <title>2.</title> </section> </chapter> </content> % --> <!ELEMENT section (title?, subtitle*, dedication?, slogan?, (text+ | extra*))> <!-- @attr id specify a unique id --> <!ATTLIST section id ID #IMPLIED> <!-- @attr number the number of the section --> <!ATTLIST section number CDATA #IMPLIED> <!-- This tag may be used to define a coda. A coda can also be considdered as an epilog or something like this. % <content> <chapter number="1"></chapter> <chapter number="2"></chapter> <coda></coda> </content> % --> <!ELEMENT coda (chapter+ | text+ | extra*)> <!-- This tag defines an act of a dramatic opus. % <opus class="play"> <content> <act number="1"> <title>First Act</title> <scene></scene> </act> </content> </opus> % --> <!ELEMENT act (title?, subtitle*, dedication?, slogan?, description?, (scene+ | extra*))> <!-- @attr id specify a unique id --> <!ATTLIST act id ID #IMPLIED> <!-- @attr number the number of the act --> <!ATTLIST act number CDATA #IMPLIED> <!-- This tag encloses a scene of a dramatic opus. % <act number="1"> <scene number="1"> <title>Scene 1</title> </scene> <scene number="2"> <title>Scene 2</title> </scene> </act> % --> <!ELEMENT scene (title?, subtitle*, slogan?, acting*, ((description?, speech)+ | extra*) )> <!-- @attr id specify a unique id --> <!ATTLIST scene id ID #IMPLIED> <!-- @attr number the number of the scene --> <!ATTLIST scene number CDATA #IMPLIED> <!-- With this tag one may define the acting parts of a scene. % <scene number="1"> <acting>The Officer</acting> <acting>The Thief</acting> </scene> % --> <!ELEMENT acting (#PCDATA | extra)*> <!-- A single speech. % <scene> <speach> <speaker>The Officer</speaker> <text> <par>Alas!</par> </text> </speach> </scene> % --> <!ELEMENT speech (speaker, ((description?, text)+ | extra*) )> <!-- The speaker of the current speech. % <scene> <speach> <speaker>The Officer</speaker> <text> <poetize> <stanza> <line>Alas!</line> </stanza> <poetize> </text> </speach> </scene> % --> <!ELEMENT speaker (#PCDATA | extra)*> <!-- Give a custom descrption to a speech, scene or act. % <speach> <speaker>The Officer</speaker> <description>sad</description> <text> <par>Alas...</par> </text> <description>angry</description> <text> <par>Alas!</par> </text> </speach> % --> <!ELEMENT description (#PCDATA | extra)*> <!-- Enclose a single paragraph. Every text snippet should either be stored inside of a <code><par></code> tag or a <code><line></code> tag. % <par>"What a wonderful day", she said.</par> % To apply version control you may use the <code>version</code> attribute. % <par id="p23" idrefs="p23_0.1.1 p23_0.1.2" version="0.1.0">"What a wonderful day", she said.</par> <par id="p23_0.1.1" idref="p23" version="0.1.1">"What a beautiful day", she said.</par> <par id="p23_0.1.2" idref="p23" version="0.1.2">"What a day", she said.</par> % Use the <code>mode</code> attribute to request special treatment of the paragraph. % <par mode="hidden" type="todo">Add a chapter here.</par> % --> <!ELEMENT par (#PCDATA | poetize | enum | tinged | mark | binary | extra)*> <!-- @attr id specify a unique id --> <!ATTLIST par id ID #IMPLIED> <!-- @attr idref reference 'id' e.g. of another version --> <!ATTLIST par idref IDREF #IMPLIED> <!-- @attr idrefs references to 'id's e.g. of subsequent versions --> <!ATTLIST par idrefs IDREFS #IMPLIED> <!-- @attr version define a version of this paragraph --> <!ATTLIST par version CDATA #IMPLIED> <!-- @attr date define the date of this paragraph or version --> <!ATTLIST par date CDATA #IMPLIED> <!-- @attr type define a custom type of the paragraph --> <!ATTLIST par type CDATA #IMPLIED> <!-- @attr mode define a special mode of this paragraph --> <!ATTLIST par mode ( special | solitary | empty | hidden) #IMPLIED> <!-- @attr xml:lang define the language of the paragraph --> <!ATTLIST par xml:lang NMTOKEN #IMPLIED> <!-- Define a footnote. Usually not needed, but if you try to store texts of Laurence Sterne or Jean Paul you might be happy about this. % <par id="p345" idref="f24"> </par> <footnote id="f24" idref="p345" offset="0"> This line is not empty. It shows the nothingness in its entire beauty! </footnote> % --> <!ELEMENT footnote (#PCDATA | tinged | binary | extra)*> <!-- @attr id specify a unique id --> <!ATTLIST footnote id ID #IMPLIED> <!-- @attr idref reference 'id' e.g. of paragraph --> <!ATTLIST footnote idref IDREF #REQUIRED> <!-- @attr offset bind this footnote to offset'th character of the referenced paragraph, starting with 0 --> <!ATTLIST footnote offset CDATA #REQUIRED> <!-- This is for poems or similar parts of a text. % <poetize> <stanza> <line></line> <stanza> </poetize> % --> <!ELEMENT poetize (stanza+, (footnote* | extra*))> <!-- Enclose a single stanza. % <poetize> <stanza> <line>One hand good,</line> <line>One holds food,</line> <line>One is none,</line> <line>Linda's gone.</line> <stanza> </poetize> % Cf. <a href="#par"><code><par></code></a> for the use of <code>version</code>, <code>type</code> and <code>mode</code> attribute. --> <!ELEMENT stanza (line+ | extra*)> <!-- @attr id specify a unique id --> <!ATTLIST stanza id ID #IMPLIED> <!-- @attr idref reference 'id' e.g. of another version --> <!ATTLIST stanza idref IDREF #IMPLIED> <!-- @attr idrefs references to 'id's e.g. of subsequent versions --> <!ATTLIST stanza idrefs IDREFS #IMPLIED> <!-- @attr version define a version of this stanza --> <!ATTLIST stanza version CDATA #IMPLIED> <!-- @attr date define the date of this stanza or version --> <!ATTLIST stanza date CDATA #IMPLIED> <!-- @attr type define a custom type of the stanza --> <!ATTLIST stanza type CDATA #IMPLIED> <!-- @attr mode define a special mode of this stanza --> <!ATTLIST stanza mode ( special | solitary | empty | hidden ) #IMPLIED> <!-- A single line of a poem. % <poetize> <stanza> <line>One hand good,</line> <line>One holds food,</line> <line>One is none,</line> <line>Linda's gone.</line> <stanza> </poetize> % Cf. <a href="#par"><code><par></code></a> for the use of <code>version</code>, <code>type</code> and <code>mode</code> attribute. --> <!ELEMENT line (#PCDATA | tinged | mark | binary | extra)*> <!-- @attr id specify a unique id --> <!ATTLIST line id ID #IMPLIED> <!-- @attr idref reference 'id' e.g. of another version --> <!ATTLIST line idref IDREF #IMPLIED> <!-- @attr idrefs references to 'id's e.g. of subsequent versions --> <!ATTLIST line idrefs IDREFS #IMPLIED> <!-- @attr version define a version of this line --> <!ATTLIST line version CDATA #IMPLIED> <!-- @attr date define the date of this line or version --> <!ATTLIST line date CDATA #IMPLIED> <!-- @attr type define a custom type of the line --> <!ATTLIST line type CDATA #IMPLIED> <!-- useful if you need different types --> <!-- @attr mode define a special mode of this line --> <!ATTLIST line mode ( special | solitary | empty | hidden ) #IMPLIED> <!-- @attr xml:space define the treatment of blanks for this line --> <!ATTLIST line xml:space (default|preserve) #FIXED 'preserve'> <!-- This tag allows for structural recursion. The same effect may take place if one refers to external entities. % <opus> <meta></meta> <content> <extra name="global"> <content></content> <content> <text> <par> <extra name="local"> <meta></meta> <content></content> <extra> </par> </text> </content> </extra> </content> </opus> % --> <!ELEMENT extra (meta? | content+)> <!-- recursion --> <!-- @attr id specify a unique id --> <!ATTLIST extra id ID #IMPLIED> <!-- @attr name give the current recursion container a name --> <!ATTLIST extra name CDATA #IMPLIED> <!-- Define an enumeration. % <enum type="number"> <item><par>First</par></item> <item><par>Second</par></item> </enum> % --> <!ELEMENT enum (item+)> <!-- enumeration --> <!-- @attr id specify a unique id --> <!ATTLIST enum id ID #IMPLIED> <!-- @attr type define a custom type of the enumeration --> <!ATTLIST enum type CDATA #IMPLIED> <!-- Define an item of an enumeration. % <enum type="number"> <item><par>First</par></item> <item><par>Second</par></item> </enum> % --> <!ELEMENT item (par+ | extra+)> <!-- @attr id specify a unique id --> <!ATTLIST item id ID #IMPLIED> <!-- Mark text as tinged. This may be used to emphasize some words or to mark words or sentences as to speek or understand in a special way, e.g. angry or gentle. % <par>So, <tinged type="angry">come</tinged> to me!</par> % --> <!ELEMENT tinged (#PCDATA)> <!-- tinged text (emphasis et.al.) --> <!-- @attr id specify a unique id --> <!ATTLIST tinged id ID #IMPLIED> <!-- @attr idref reference a single node --> <!ATTLIST tinged idref IDREF #IMPLIED> <!-- @attr type specify the type of the tinge --> <!ATTLIST tinged type CDATA #IMPLIED> <!-- Set a sematic mark. This may be used to mark persons, sites, times, metaphors or other entities. The marks may be grouped by the <code>type</code> attribute to use the document as a searchable database. % <par>"What a beautiful day", <mark type="person" name="Linda">she</mark> said.</par> <par>They met <mark type="site" name="Linda's Appartement">there</mark> the next day.</par> <par>They met there <mark type="time" name="day 3">the next day</mark>.</par> <par>Her words were <mark type="metaphor" comment="reel bees">flighty butterflies</mark>.</par> % --> <!ELEMENT mark (#PCDATA)> <!-- @attr id specify a unique id --> <!ATTLIST mark id ID #IMPLIED> <!-- @attr idref reference a certain node --> <!ATTLIST mark idref IDREF #IMPLIED> <!-- @attr idrefs references certain nodes --> <!ATTLIST mark idrefs IDREFS #IMPLIED> <!-- @attr type define the type of the mark --> <!ATTLIST mark type CDATA #IMPLIED> <!-- @attr name give the mark a unique name --> <!ATTLIST mark name CDATA #IMPLIED> <!-- @attr comment add a comment to the mark --> <!ATTLIST mark comment CDATA #IMPLIED> <!-- Include binary data such as images in the document. Though one may use external entities to include references to binary data this element may be useful to distribute a whole document as is. Note: Binary data must be encoded either with "Base64" or "Quoted Printable". % <par> <binary name="image.gif" encoding="base64">R0lGODlh...</binary> </par> % --> <!ELEMENT binary (#PCDATA)> <!-- @attr id specify a unique id --> <!ATTLIST binary id ID #IMPLIED> <!-- @attr idref reference a single node --> <!ATTLIST binary idref IDREF #IMPLIED> <!-- @attr idrefs reference a group of nodes --> <!ATTLIST binary idrefs IDREFS #IMPLIED> <!-- @attr name give the included ressource a name --> <!ATTLIST binary name CDATA #IMPLIED> <!-- @attr encoding specify one of the two possible encodings --> <!ATTLIST binary encoding (base64|quoted_printable) #REQUIRED> <!-- @attr offset bind this binary to the offset'th character of the referenced node, starting with 0--> <!ATTLIST binary offset CDATA #IMPLIED>