[The HTML Writers Guild Logo]

The HTML Writers Guild

Project gutenberg
[Previous] [HWG Home page] [Gutenberg Index] [Next]

The 'bookfrag' DTD

The bookfrag.dtd can be either used alone or as a module in the gutbook1.dtd. It has a simple top level structure, and a bottom level structure that accounts for most of the divisions of most books. If a new division is needed it is possible to use one of the attributes to 'modify' the element. The full 'bookfrag' dtd can be obtained here. Before reading this material you may want to review the essay "The parts of a book"

Top level structure

The top level structure of the poemsfrag document type is given as follows

<!ELEMENT book (acknowledge?,meta*,frontmatter?,bookbody,backmatter?,endmeta*)>

The following figure shows the top level structure of the bookfrag.dtd. in graphical form.

The parts of an e-text

The 'inline' and 'block' classes

'bookfrag' uses classes of elements to improve the readability of the DTD. Essentially there are two classes, the 'inline' elements and the 'block' elements. Here are the entities that declare the two classes

<!ENTITY % inline.class "|quote|emph|ital|reference|date|place|name|graphic|misc">

<!ENTITY % block.class "|blockquote|footnote|note|list|deflist|table|blockgraphic">

The individual elements will be discussed later on. The inline.class will be discussed later on in this page, the block.class will be discused when the body of a book is discussed.

The 'meta' and 'endmeta' elements

These elements are designed to contain comments on either the markup or the original material. They may be referenced from any element using the 'ref' attribute of that element. Both the meta and the endmeta elements are empty elements. They have an 'id' and a 'content' attribute. The later contains the message, and the former must be used if the element is being referenced from within the document. Usually referenced elements will be at the end of the document. i.e. they will be endmeta elements. (For those of you who are wondering why they cannot have the same name, if they do have the same name an ambiguity error will arise in the validation process).

'meta': - The element and attribute declarations

Here is the element and attribute declaration for the meta element.

<!ATTLIST meta
   content  CDATA  #REQUIRED
   id       ID     #IMPLIED

The declarations for the endmeta element is similar.

The 'acknowledge' element

This element can be used to provide a simple acknowledgement that is designed to be read by the public. Although the inline classes are in cluded this element will usually just be plain #PCDATA

'acknowledge': - The content model

<!ELEMENT acknowledge (#PCDATA %inline.class;)*>

The 'frontmatter' element

The front matter can contain one or more of several elements as depicted in the element content model.

This is illustrated graphically here

The parts of an e-text

'frontmatter': - The content model

<!ELEMENT frontmatter (htitlepage|copypage|epigraph|titlepage|toc|acksect

A description of the frontmatter element is given on the next page.

The 'bookbody' element

The bookbody element can have either several chapters OR several parts (which can contain chapters.This is illustrated graphically here:

The parts of an e-text

'bookbody': - The content model

<!ELEMENT bookbody (part*|chapter*)>

A description of the bookbody element is given on another page.

The 'backmatter' element

The backmatter element can have appendices indexes, glosarries, and biliographies (or lists of references), as well as a single colophon.This is illustrated graphically here:

The parts of an e-text

'backmatter': - The content model

<!ELEMENT backmatter ((appendix|index|glossary|biblio)*,colophon?)>

A description of the backmatter element is given on another page.

The 'inline.class' elements

Here again is the entity declaration for the inline class of elements.

<!ENTITY % inline.class "|quote|emph|ital|reference|date|place|name|graphic|misc">

They all take an element declaration similar to the quote element. In other words they can contain other inline elements as well as #PCDATA

<!ELEMENT quote (#PCDATA %inline.class;)*>

The 'quote' element

For an inline quotations.

The 'emph' element

It is the markers call whether to use the emph element. See the comments on ital element below.

The 'ital' element

In the original text words may be put in italics. This element should however always be used in conjunction with another inline element

The 'reference' element

A reference of some sort, possibly to a foot note.

The 'date' element

A date or time.

The 'place' element

A place or location.

The 'name' element

A proper name.

The 'graphic' element

An inline graphic. The content model of this element is discuussed on this page when the blockgraphic element is discussed.

The 'misc' element

Use the type or role attributes to further describe this element.

[Previous] [HWG Home page] [Gutenberg Index] [Next]

[Valid XHTML 1.0]
This page is maintained by frank@hwg.org. Last updated on 16 January 2000.
Copyright © 2000 by the HTML Writers Guild, Inc.