Renditional keywords: bestow and bequeath [128]

Abstract

Use of the bestow and bequeath keywords to propagate renditional information from an element to its children or descendants

Discussion

The bestow and bequeath keywords are ways to propagate renditional information from one element to its descendants or its children. They can save a great deal of encoding and reduplication if used correctly. Cases where they may be useful include sections of text whose background rendition is reversed (e.g. a prefatory <div> in italics), where the rendition of phrase-level elements is the reverse of the default; also in long quotations which propagate quotation marks down the left margin.

The syntax for these two elements is identical; it first identifies the rendition(s) to be bestowed or bequeathed, and then the element or elements to which that rendition is to be given (multiple recipient elements are separated by spaces):

<div rend="bestow( (slant(italic)face(roman)) (persName placeName foreign emph mcr))">

The function of these two keywords is also nearly identical, except that the bestow keyword propagates its features to all of the element’s descendants (any element within it, no matter how deeply nested), whereas the bequeath keyword propagates its features only to the element’s children (that is, the elements which are immediately nested within it).

Thus bequeath is appropriate in cases like nested lists, where the same element needs different treatment depending on its level of nesting:

<list rend="bequeath( (pre(&bullet;) indent(+1)) (item))">

<item>First item</item>

<item>Second item</item>

<item><list><item>subitem 1</item>

                    <item>subitem 2</item></list>

<item>Third item</item>

</list>

In this example, the items in the outer list get bullets, but the items in the nested list (subitems 1 and 2) do not. The nested parentheses in the keyword value look confusing, but if you take each component separately it becomes clearer. The two basic parts are the rendition ladder being bequeathed, and the name of the element it will affect. Each of these components are enclosed in a separate set of parentheses, and then the whole thing is enclosed within parentheses to become the argument of the bequeath keyword.

Bestow is appropriate in cases where you want the rendition to affect all instances of a particular element which occur within the parent element, not just the direct children. An example of this would be quotations in early texts, where the quotation marks extend down the entire margin of the quotation. In this case, the element to be affected is <lb/>, which is often a direct child of the <q> element. However, since <lb/> might nest inside other elements which cross line breaks (such as <name>), bequeath will not work (since in those cases <lb/> is not a direct child of <q>). In this case, bestow is necessary, since it will propagate rendition to all <lb/> elements within the <q> element, no matter how deeply nested:

<q rend="bestow( (pre(&ldquo;)) (lb) )">

list all entries

search

about

wwp