Punctuation and elements

name abbreviation possessive punctuation tag rendition element font

As a basic principle, punctuation should be transcribed with respect to TEI elements where it makes most logical sense: it should be encoded as part of the element to which it logically belongs. Thus:

  1. Punctuation should go outside of phrase-level elements, unless it is clearly part of the element content. For example:
    He loved <persName>London</persName>; he hoped to return in happier times.
    Her most notable play was <title>Who&apos;s the Dupe?</title>
  2. Punctuation should go inside of chunk-level elements such as paragraphs, quotations, list items, and the like, unless it clearly belongs outside. For example:
    <p>Did you ever hear anything so beautiful as his rendition of <quote>To be or not to be</quote>?</p>
    <p>He liked everyone he met, except for the following:
    <p>     <item>Babies;</item></p>
    <p>     <item>Small children;</item></p>
    <p>     <item>Adolescents;</item></p>
    <p>     <item>Young people</item></list>.</p>

The placement of the final period is debatable but also not very important. This example treats it as part of the paragraph content rather than part of the list item. The semicolons that terminate each list item might, in a more fussy encoding, be treated as delimiters (item rend="post(;)") but it is easier as shown, and for most purposes there is no disadvantage to this approach.

There are some difficult cases in which the punctuation does not belong inside a phrase-level element, but is not permitted outside of it. Examples include cast lists, where character data is not permitted between the role and roleDesc elements, although punctuation separating the two does not logically appear to belong inside either element. One solution in this case is to encode the punctuation as part of the rendition of one of the elements. If the details of punctuation are not of interest, it could also be omitted and then generated for display by a stylesheet.


Example 1.

<p><q>How odd</q>, she thought 
to herself, <q>that the girls aren&apos;t 
back yet.</q> <persName>Mabel</persName>, 
her favorite, was fond of pointing out that girls are 
often unpunctual, but never <emph>late</emph>.</p>
<bibl><author>Jones, G.</author>, 
<title>Never Again!</title>, <imprint>Loonsville, 
MA, 1843</imprint>.</bibl>