Rules and ornaments: use as delimiters

ruled lines ornament decoration figure image border emblem
rend mw fw

Encoding of rules and ornaments as delimiters on elements, using the rend attribute

In order to preserve flexibility in display and processing, ornaments and ruled lines should wherever possible be encoded as the opening or closing delimiter of an element, rather than being transcribed as content: in other words, the encoding should express their relationship to the text’s structure. The encoding in this example says, in effect, that the boundaries of this textual division are marked by ruled lines:

<div rend="pre(&rule;) post(&rule;)">

There will be some circumstances where there is no logical way to construe the rule/ornament as a delimiter, and in these cases it can be encoded as content within an element.

Some judgment may be needed to decide whether to encode the rule/ornament as an opening or closing delimiter, based on the general page layout and the use of rules/ornaments throughout the text. Some general guidelines may be useful:

Where a pattern can be discerned (e.g. all chapters begin with a ruled line) that pattern should be used as a basis for deciding where to encode the delimiter (in this case, as rend="pre(&rule;)" on the div element enclosing the chapter, rather than on the heading for the chapter).

Where no such pattern is detected, and a rule or ornament lies at the boundary between two divs, it should be encoded as a closing delimiter on the first of the two divs:

<div rend="post(&rule;)">

In cases where a rule or ornament precedes the first div, it should be encoded as

<div rend="pre(&rule;)">

Similarly, if the rule or ornament lies at the boundary between two non-div elements, it should be encoded as a renditional attribute of the first of the two elements.

When several elements begin or end at the same point in the text, the renditional attribute should be applied to the innermost appropriate element (though this is subject to your common sense identification of which element actually is being marked):

<text><front><div rend="pre(&rule;)">

Where a rule or ornament is used as a border surrounding an element it is encoded using the border keyword on the rend attribute of the element being surrounded:

<div type="epigraph" rend="border(&rule;)">

Where the rule or ornament is a border surrounding an entire page (even if, as in the case of the title page, this page is also encoded as the content of a non-empty element), we recommend encoding it with an fw element (placed at the top of the page) as follows:

<fw type="border" rend="place(fullPageSurround)">&ornament;</fw>

This is largely for the sake of consistency; if your title pages are the only pages with borders, it makes more sense to encode the border on the titlePage element:

<titlePage rend="border(&ornament;)">