[The HTML Writers Guild Logo]


The HTML Writers Guild

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

The 'teixlite' DTD: - Poems & Poetry

TEI uses a 'line group' (lg) and 'line' (l) elements to mark up poetry. Consider the following Nursery Rhyme.

  Jack Spratt

    "Jack Spratt could eat no fat,
    His wife could eat no lean.
    And so between the pair of them,
    They licked the platter clean."

  Anon.

  Traditional English Nursery Rhyme

Here is how the verse might look when marked up in TEI.

<lg>
  <l>"Jack Spratt could eat no fat,</l>
  <l>His wife could eat no lean.</l>
  <l>And so between the pair of them,</l>
  <l>They licked the platter clean."</l>
</lg>

Marking upindividual poems.

In poetry it is usualy to consider each poem as a self contained text element, so here is how a complete TEI file will look. Note how it is divided into front, body, and back matter by the appropriate elements.

<!DOCTYPE text SYSTEM "teixlite.dtd">
<text>
 <front>
   <head>Jack Spratt</head>
 </front>
 <body>
  <lg>
    <l>"Jack Spratt could eat no fat,</l>
    <l>His wife could eat no lean.</l>
    <l>And so between the pair of them,</l>
    <l>They licked the platter clean."</l>
  </lg>
  <trailer>Anon.</trailer>
 </body>
 <back>
   <div><p>Traditional English Nursery Rhyme</p></div>
 </back>
</text>

Notes

Marking up collections and Anthologies

By and large when marking up an anthology of poems it is easiest to consider each poem as a seperate text division contained within a group element.

<text><!--begin composite text-->
  <front>
       ...[front matter for composite text..] 
  </front>
  <group><!--container for individual texts-->
    <text>
      <front>
         ...[front matter for individual text..] 
      </front>
      <body>
         ...[body of individual text..] 
      </body>
      <back>
         ...[back matter for individual text..] 
      </back>
    </text>
    <text>...[content of next individual text]...</text>
    <text>...[content of next individual text]...</text>
      ...etc...
  </group>
  <back>
       ...[back matter for composite text..] 
  </back>
</text><!--end composite text-->

Example

Here is an example of two Nursery Rhymes marked up as part of an Anthology.


<!DOCTYPE text SYSTEM "teixlite.dtd">
<text>
 <front>
   <head>An Anthology of Nursery Rhymes</head>
 </front> 
 <group>
  <text>
   <front>
    <head>Jack Spratt</head>
   </front>
   <body>
   <lg>
    <l>"Jack Spratt could eat no fat,</l>
    <l>His wife could eat no lean.</l>
    <l>And so between the pair of them,</l>
    <l>They licked the platter clean."</l>
   </lg>
   <trailer>Anon.</trailer>
   </body>
   <back>
    <div><p>Traditional English Nursery Rhyme</p></div>
   </back>
  </text>

  <text>
   <front>
    <head>Three Blind Mice</head>
   </front>
   <body>
   <lg>
    <l>"Three blind mice,</l>
    <l>Three blind mice,</l>
    <l>See how they run.</l>
    <l>See how they run.</l>
    <l>They all ran after the farmers wife,</l>
    <l>Who cut off their tails with a carving knife.</l>
    <l>Did you ever see such a thing in your life?</l>
    <l>As three blind mice."</l>

   </lg>
   <trailer>Anon.</trailer>
   </body>
   <back>
    <div><p>Traditional English Nursery Rhyme, often sung as a round.</p></div>
   </back>
  </text>

 </group>
 <back>
    <div><p>Example for TEI Tutorial</p></div>
 </back>
</text>

We will look at marking up a more complex poetry example later on in this tutorial. On the next page we will look at how plays are marked up.

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

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