|
The previous pages looked at marking up a book with a relatively simple structure. In this page we will look at a book with a some what more complex structure, namely "Tess of the d'Ubervilles". The 'meta' data of the book is marked up in the usual manner. it is the content of the book which contains some added difficulties.
This book contains several parts to it, so we will be using the following overall structure.
<text> <front> ...[book front content here]... </front> <group> <text> <front> ...[part 1 front content here]...</front> <body> ...[part 1 body content here]...</body> <back> ...[part 1 back content (if any) here]...</back> </text> <text> ...[content of part 2]...</text> <text> ...[content of part 3]...</text> ...etc... </group> <back> ...[book back content(if any) here]... </back> </text>
The front matter of 'Tess' consists of a title page and a table of contents. Here is the markup of the title page.
<front> <titlePage> <docTitle> <titlePart>Tess of the d'Urbervilles</titlePart> </docTitle> <titlePart>A Pure Woman</titlePart> <titlePart>Faithfully Presented By </titlePart> <docAuthor>Thomas Hardy</docAuthor> </titlePage> ... </front>
Notes:
docTitle
element is not strictly necessary, (we could have used the titlePart
element as a direct child of titlePage
) but we used it here to deliniate the main title of the document.titlePage
can contain numerous titlePart
elementsdocAuthor
element caontains the name of the authortitlePart
element can contain other content.Here is how the table of contents is laid out in the front matter
<front> ... <div type="toc"> <list> <head> Contents </head> <label>Phase the First: </label> <item> The Maiden, I-XI </item> ...... <label>Phase the Seventh:</label> <item> Fulfillment, LIII-LIX</item> </list> </div> </front>
Notes:
div
element is used to contain and define the table of contents.list
element is used for laying out the toc.label
and an item
element is used to seperate each line of the toc.All the parts are contained in a group element which replaces the body element of a simpler layout. The following exerpt shows the begining ofpart 1, the transition to part 2, including the backmatter of part 1, the beginning of part 2, and then jumps to the back matter of the entire book.
... </front> <group> <text> <front> <titlePart> <title>Phase the First: The Maiden</title> </titlePart> </front> <body> <div1 type="chapter"> <head>I</head> <p>On an evening in the latter part of May a middle-aged man was walking homeward from Shaston to the village of ....... </div1> </body> <back> <div type="partend"> <p>END OF PHASE THE FIRST</p> </div> </back> </text> <text> <front> <head>Phase the Second: Maiden No More</head> .......[the other parts of the book]....... </text> </group> <back><!the back matter of the entire book--> <div type="bookend"> <p> End of the Project Gutenberg edition of Tess of the d'Urbervilles </p> </div> </back> </text><!--The closing tag of the composite text element that contains all the content-->
Notes:
text
element in the group has it's own front, body,/code> and back
elements with the relevant content.text
element which holds the entire document has its own front
and back
elements, but the body element is replaced by the group
element.This is the end of our brief tutorial.