Text structure

From XML
Revision as of 13:05, 26 April 2017 by PBO (Talk | contribs) (Created page with "While encoding texts, the textual hierarchy is being taken into account. Every single text is encoded using the <text> element, which contains a mandatory <body> element. If s...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

While encoding texts, the textual hierarchy is being taken into account. Every single text is encoded using the <text> element, which contains a mandatory <body> element. If so desired, any possible (hierarchical) substructure of the text can be encoded through <div> (‘division’) elements, each enclosing one or more <p> (‘paragraph’) elements and complemented with an @type attribute that describes what kind of division is meant.

The type of elements contained by the <text> depends on the type of text that is being encoded. For example, the text of prose usually consists of one or more <p> elements, whereas poetry consists of <lg> (‘line group’) elements that in itself enclose one or more <l> (‘line’) elements. Titles and such can be encoded with a <head> element.

Example:

<text>
 <body>
  <div type="part">
   <head>Opschrift</head>
   <p>Tekst van onderdeel</p>
   <div type="chapter" n="1">
    <head>Opschrift</head>
    <p>Tekst van hoofdstuk 1</p>
    <div type="section" n="1.1">
     <head>Tussenkop</head>
     <p>Tekst van paragraaf 1.1</p>
    </div>
    <div type="section" n="1.2">
     <head>Tussenkop</head>
     <p>Tekst van paragraaf 1.2</p>
     <p>Tekst van paragraaf 1.2 (vervolg)</p>
     <p>Tekst van paragraaf 1.2 (verder vervolg)</p>
    </div>
   </div>
  </div>
 </body>
</text>

See also