xldl.dtd

XLDL Literature Description Language

$Date: 2005/01/04 12:47:47 $

Overview: doctype for novels, stories, poems, plays
Version: 0.2.0
Copyright: 2004 (c) Ingo Schramm
License: GNU LGPL
Public: -//Ister.ORG//XLDL Literature Description Language//EN
System: http://xml.ister.org/dtd/xldl/xldl.dtd

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:

0.2.0
added element <sourcelang>
added element <mark>
added element <binary>
moved element <holder> to <owner>
added a number of id attributes

0.1.0
first production release

This document includes DTDDoc documentation.



<opus> Root element

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>

<opus>'s children
NameCardinality
contentOnly one
metaOnly one
<opus>'s attributes
NameValuesDefault
classbooks, book, article, novel, story, essay, poem, play, tragedy, comedy, radioplay, screenplay
xmlnshttp://xml.ister.org/dtd/xldl
xmlns:xldlhttp://xml.ister.org/dtd/xldl
Element's model :

(meta, content)


@xmlns:xldl Attribute of opus

specify the XLDL namespace of an opus

Default value: http://xml.ister.org/dtd/xldl


@xmlns Attribute of opus

specify the default namespace of an opus

Default value: http://xml.ister.org/dtd/xldl


@class Attribute of opus

specify the class of the current opus

Possible values : books, book, article, novel, story, essay, poem, play, tragedy, comedy, radioplay, screenplay


<meta> Child of extra,opus

Metadata of the current opus.

This element encloses all metadata of the opus.

<meta>
  <title>The Wide Open</title>
  <author>John Gott</author>
</meta>

<meta>'s children
NameCardinality
acknowledgementAny number
authorAny number
copyrightOne or none
dedicationAny number
disclaimerAny number
sloganAny number
sourcelangOne or none
subtitleAny number
titleOnly one
typeOnly one
Element's model :

(title, subtitle*, author*, type, copyright?, sourcelang?, dedication*, acknowledgement*, disclaimer*, slogan*)


<title> Child of act,volume,meta,chapter,scene,preface,part,section

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>

<title>'s children
NameCardinality
textAny number
Element's model :

(#PCDATA | text)*


<subtitle> Child of act,volume,meta,chapter,scene,preface,part,section

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>

<subtitle>'s children
NameCardinality
textAny number
Element's model :

(#PCDATA | text)*


<author> Child of meta,slogan

Store the names of one or more authors.

<author>John Gott</author>


<type> Child of meta

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>


<copyright> Child of meta

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>

<copyright>'s children
NameCardinality
locationAny number
ownerOnly one
textOne or none
yearOnly one
Element's model :

(year, owner, location*, text?)


<year> Child of copyright

The year the copyright has been claimed.

<year>2004</year>


<owner> Child of copyright

The owner of the copyright.

<owner>John Gott</owner>


<location> Child of copyright

The location of the copyright claim.

<location>EU</location>
<location>USA</location>
<location>World</location>


<sourcelang> Child of meta

Give the original or source language of the opus.

<sourclang>ger</sourcelang>


<dedication> Child of act,volume,meta,chapter,part,section

The opus or a part of the opus may be dedicated to someone.

<dedication>To Nora.</dedication>


<acknowledgement> Child of meta

The author or publisher may need to acknowledge someone.

<acknowledgement>
  <text>
    <par>My Brother.</par>
  </text>
</acknowledgement>

<acknowledgement>'s children
NameCardinality
textOnly one
Element's model :

(text)


<disclaimer> Child of meta

If the publisher or the author have something to disclaim.

<disclaimer>
  <text>
    <par>Seriousness cannot be guaranteed.</par>
  </text>
</disclaimer>

<disclaimer>'s children
NameCardinality
textOnly one
Element's model :

(text)


<slogan> Child of act,volume,meta,chapter,scene,part,section

There may be a slogen preceeded to the whole opus.

<slogan>
  <text>
    <par>The wide open. Nothing holy.</par>
  </text>
  <author>Bodhidarma</author>
</slogan>

<slogan>'s children
NameCardinality
authorAny number
textOnly one
Element's model :

(text, author*)


<content> Child of extra,opus

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 <extra> tag since only one <content> tag is allowed.

<content>
  <extra>
    <content version="1.0"></content>
    <content version="2.0"></content>
  </extra>
</content>

<content>'s children
NameCardinality
actAny number
chapterAny number
codaOne or none
extraAny number
partAny number
prefaceOne or none
sceneAny number
textAny number
volumeAny number
<content>'s attributes
NameValuesDefault
date
version
Element's model :

(preface?, (volume+ | part+ | chapter+ | act+ | scene+ | text+ | extra*), coda?)


@version Attribute of content

specify the version of the content


@date Attribute of content

specify the date of the content


<preface> Child of volume,content

This tag includes a preface.

<preface>
  <title>Preface</title>
  <text>
    </par>This book is about nothing.</par>
  </text>
</preface>

<preface>'s children
NameCardinality
chapterAny number
extraAny number
subtitleAny number
textAny number
titleOne or none
<preface>'s attributes
NameValuesDefault
idMatch the ID rules.
Element's model :

(title?, subtitle*, (chapter+ | text+ | extra*))


@id Attribute of preface

specify a unique id

Possible values : Match the ID rules.


<text> Child of title,copyright,chapter,content,coda,acknowledgement,speech,preface,slogan,section,subtitle,disclaimer

This tag stores any type of text.

The <text> 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>

<text>'s children
NameCardinality
extraAny number
footnoteAny number
parAny number
poetizeAny number
<text>'s attributes
NameValuesDefault
idMatch the ID rules.
Element's model :

((par+ | poetize+ | extra*), footnote*)


@id Attribute of text

specify a unique id

Possible values : Match the ID rules.


<volume> Child of content

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>

<volume>'s children
NameCardinality
chapterAny number
codaOne or none
dedicationOne or none
extraAny number
partAny number
prefaceOne or none
sloganOne or none
subtitleAny number
titleOne or none
<volume>'s attributes
NameValuesDefault
idMatch the ID rules.
number
Element's model :

(title?, subtitle*, dedication?, slogan?, preface?, (part+ | chapter+ | extra*), coda?)


@id Attribute of volume

specify a unique id

Possible values : Match the ID rules.


@number Attribute of volume

the number of the volume


<part> Child of volume,content

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>

<part>'s children
NameCardinality
chapterAny number
dedicationOne or none
extraAny number
sloganOne or none
subtitleAny number
titleOne or none
<part>'s attributes
NameValuesDefault
idMatch the ID rules.
number
Element's model :

(title?, subtitle*, dedication?, slogan?, (chapter+ | extra*))


@id Attribute of part

specify a unique id

Possible values : Match the ID rules.


@number Attribute of part

the number of the part


<chapter> Child of volume,content,coda,preface,part

Define a chapter.

<content>
  <chapter number="1">
    <title>Chapter I</title>
  </chapter>
  <chapter number="2">
    <title>Chapter II</title>
  </chapter>
</content>

<chapter>'s children
NameCardinality
dedicationOne or none
extraAny number
sectionAny number
sloganOne or none
subtitleAny number
textAny number
titleOne or none
<chapter>'s attributes
NameValuesDefault
idMatch the ID rules.
number
Element's model :

(title?, subtitle*, dedication?, slogan?, (section+ | text+ | extra*))


@id Attribute of chapter

specify a unique id

Possible values : Match the ID rules.


@number Attribute of chapter

the number of the chapter


<section> Child of chapter

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>

<section>'s children
NameCardinality
dedicationOne or none
extraAny number
sloganOne or none
subtitleAny number
textAny number
titleOne or none
<section>'s attributes
NameValuesDefault
idMatch the ID rules.
number
Element's model :

(title?, subtitle*, dedication?, slogan?, (text+ | extra*))


@id Attribute of section

specify a unique id

Possible values : Match the ID rules.


@number Attribute of section

the number of the section


<coda> Child of volume,content

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>

<coda>'s children
NameCardinality
chapterAny number
extraAny number
textAny number
Element's model :

(chapter+ | text+ | extra*)


<act> Child of content

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>

<act>'s children
NameCardinality
dedicationOne or none
descriptionOne or none
extraAny number
sceneAny number
sloganOne or none
subtitleAny number
titleOne or none
<act>'s attributes
NameValuesDefault
idMatch the ID rules.
number
Element's model :

(title?, subtitle*, dedication?, slogan?, description?, (scene+ | extra*))


@id Attribute of act

specify a unique id

Possible values : Match the ID rules.


@number Attribute of act

the number of the act


<scene> Child of act,content

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>

<scene>'s children
NameCardinality
actingAny number
descriptionAny number
extraAny number
sloganOne or none
speechAny number
subtitleAny number
titleOne or none
<scene>'s attributes
NameValuesDefault
idMatch the ID rules.
number
Element's model :

(title?, subtitle*, slogan?, acting*, ((description?, speech)+ | extra*))


@id Attribute of scene

specify a unique id

Possible values : Match the ID rules.


@number Attribute of scene

the number of the scene


<acting> Child of scene

With this tag one may define the acting parts of a scene.

<scene number="1">
  <acting>The Officer</acting>
  <acting>The Thief</acting>
</scene>

<acting>'s children
NameCardinality
extraAny number
Element's model :

(#PCDATA | extra)*


<speech> Child of scene

A single speech.

<scene>
  <speach>
    <speaker>The Officer</speaker>
    <text>
      <par>Alas!</par>
    </text>
  </speach>
</scene>

<speech>'s children
NameCardinality
descriptionAny number
extraAny number
speakerOnly one
textAny number
Element's model :

(speaker, ((description?, text)+ | extra*))


<speaker> Child of speech

The speaker of the current speech.

<scene>
  <speach>
    <speaker>The Officer</speaker>
    <text>
      <poetize>
        <stanza>
          <line>Alas!</line>
        </stanza>
      <poetize>
    </text>
  </speach>
</scene>

<speaker>'s children
NameCardinality
extraAny number
Element's model :

(#PCDATA | extra)*


<description> Child of act,scene,speech

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>

<description>'s children
NameCardinality
extraAny number
Element's model :

(#PCDATA | extra)*


<par> Child of text,item

Enclose a single paragraph.

Every text snippet should either be stored inside of a <par> tag or a <line> tag.

<par>"What a wonderful day", she said.</par>

To apply version control you may use the version 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 mode attribute to request special treatment of the paragraph.

<par mode="hidden" type="todo">Add a chapter here.</par>

<par>'s children
NameCardinality
binaryAny number
enumAny number
extraAny number
markAny number
poetizeAny number
tingedAny number
<par>'s attributes
NameValuesDefault
date
idMatch the ID rules.
idrefMatch the IDREF rules.
idrefsMatch the IDREFS rules.
modespecial, solitary, empty, hidden
type
version
xml:langMatch the NMTOKEN rules.
Element's model :

(#PCDATA | poetize | enum | tinged | mark | binary | extra)*


@id Attribute of par

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of par

reference 'id' e.g. of another version

Possible values : Match the IDREF rules.


@idrefs Attribute of par

references to 'id's e.g. of subsequent versions

Possible values : Match the IDREFS rules.


@version Attribute of par

define a version of this paragraph


@date Attribute of par

define the date of this paragraph or version


@type Attribute of par

define a custom type of the paragraph


@mode Attribute of par

define a special mode of this paragraph

Possible values : special, solitary, empty, hidden


@xml:lang Attribute of par

define the language of the paragraph

Possible values : Match the NMTOKEN rules.


<footnote> Child of text,poetize

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>

<footnote>'s children
NameCardinality
binaryAny number
extraAny number
tingedAny number
<footnote>'s attributes
NameValuesDefault
idMatch the ID rules.
idrefMatch the IDREF rules.
offset
Element's model :

(#PCDATA | tinged | binary | extra)*


@id Attribute of footnote

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of footnote

reference 'id' e.g. of paragraph

Possible values : Match the IDREF rules. - Required


@offset Attribute of footnote

bind this footnote to offset'th character of the referenced paragraph, starting with 0

Required


<poetize> Child of text,par

This is for poems or similar parts of a text.

<poetize>
  <stanza>
    <line></line>
  <stanza>
</poetize>

<poetize>'s children
NameCardinality
extraAny number
footnoteAny number
stanzaAt least one
Element's model :

(stanza+, (footnote* | extra*))


<stanza> Child of poetize

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. <par> for the use of version, type and mode attribute.

<stanza>'s children
NameCardinality
extraAny number
lineAny number
<stanza>'s attributes
NameValuesDefault
date
idMatch the ID rules.
idrefMatch the IDREF rules.
idrefsMatch the IDREFS rules.
modespecial, solitary, empty, hidden
type
version
Element's model :

(line+ | extra*)


@id Attribute of stanza

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of stanza

reference 'id' e.g. of another version

Possible values : Match the IDREF rules.


@idrefs Attribute of stanza

references to 'id's e.g. of subsequent versions

Possible values : Match the IDREFS rules.


@version Attribute of stanza

define a version of this stanza


@date Attribute of stanza

define the date of this stanza or version


@type Attribute of stanza

define a custom type of the stanza


@mode Attribute of stanza

define a special mode of this stanza

Possible values : special, solitary, empty, hidden


<line> Child of stanza

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. <par> for the use of version, type and mode attribute.

<line>'s children
NameCardinality
binaryAny number
extraAny number
markAny number
tingedAny number
<line>'s attributes
NameValuesDefault
date
idMatch the ID rules.
idrefMatch the IDREF rules.
idrefsMatch the IDREFS rules.
modespecial, solitary, empty, hidden
type
version
xml:spacedefault, preservepreserve
Element's model :

(#PCDATA | tinged | mark | binary | extra)*


@id Attribute of line

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of line

reference 'id' e.g. of another version

Possible values : Match the IDREF rules.


@idrefs Attribute of line

references to 'id's e.g. of subsequent versions

Possible values : Match the IDREFS rules.


@version Attribute of line

define a version of this line


@date Attribute of line

define the date of this line or version


@type Attribute of line

define a custom type of the line


@mode Attribute of line

define a special mode of this line

Possible values : special, solitary, empty, hidden


@xml:space Attribute of line

define the treatment of blanks for this line

Possible values : default, preserve - Required


<extra> Child of stanza,footnote,acting,item,scene,speaker,preface,line,par,act,volume,description,chapter,text,coda,content,speech,poetize,part,section

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>

<extra>'s children
NameCardinality
contentAny number
metaOne or none
<extra>'s attributes
NameValuesDefault
idMatch the ID rules.
name
Element's model :

(meta? | content+)


@id Attribute of extra

specify a unique id

Possible values : Match the ID rules.


@name Attribute of extra

give the current recursion container a name


<enum> Child of par

Define an enumeration.

<enum type="number">
  <item><par>First</par></item>
  <item><par>Second</par></item>
</enum>

<enum>'s children
NameCardinality
itemAt least one
<enum>'s attributes
NameValuesDefault
idMatch the ID rules.
type
Element's model :

(item+)


@id Attribute of enum

specify a unique id

Possible values : Match the ID rules.


@type Attribute of enum

define a custom type of the enumeration


<item> Child of enum

Define an item of an enumeration.

<enum type="number">
  <item><par>First</par></item>
  <item><par>Second</par></item>
</enum>

<item>'s children
NameCardinality
extraAny number
parAny number
<item>'s attributes
NameValuesDefault
idMatch the ID rules.
Element's model :

(par+ | extra+)


@id Attribute of item

specify a unique id

Possible values : Match the ID rules.


<tinged> Child of footnote,line,par

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>

<tinged>'s attributes
NameValuesDefault
idMatch the ID rules.
idrefMatch the IDREF rules.
type

@id Attribute of tinged

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of tinged

reference a single node

Possible values : Match the IDREF rules.


@type Attribute of tinged

specify the type of the tinge


<mark> Child of line,par

Set a sematic mark.

This may be used to mark persons, sites, times, metaphors or other entities. The marks may be grouped by the type 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>

<mark>'s attributes
NameValuesDefault
comment
idMatch the ID rules.
idrefMatch the IDREF rules.
idrefsMatch the IDREFS rules.
name
type

@id Attribute of mark

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of mark

reference a certain node

Possible values : Match the IDREF rules.


@idrefs Attribute of mark

references certain nodes

Possible values : Match the IDREFS rules.


@type Attribute of mark

define the type of the mark


@name Attribute of mark

give the mark a unique name


@comment Attribute of mark

add a comment to the mark


<binary> Child of footnote,line,par

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>

<binary>'s attributes
NameValuesDefault
encodingbase64, quoted_printable
idMatch the ID rules.
idrefMatch the IDREF rules.
idrefsMatch the IDREFS rules.
name
offset

@id Attribute of binary

specify a unique id

Possible values : Match the ID rules.


@idref Attribute of binary

reference a single node

Possible values : Match the IDREF rules.


@idrefs Attribute of binary

reference a group of nodes

Possible values : Match the IDREFS rules.


@name Attribute of binary

give the included ressource a name


@encoding Attribute of binary

specify one of the two possible encodings

Possible values : base64, quoted_printable - Required


@offset Attribute of binary

bind this binary to the offset'th character of the referenced node, starting with 0