Difference between revisions of "Textual hierarchy"
Line 1: | Line 1: | ||
− | + | 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: | ||
<pre> | <pre> | ||
<text> | <text> | ||
<body> | <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> | |
− | + | </div> | |
− | + | </div> | |
− | + | </div> | |
</body> | </body> | ||
</text> | </text> |
Revision as of 11:59, 15 February 2017
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> </div> </div> </div> </body> </text>