next up previous
Next: <ignore-in-parent> Up: Conditions Previous: Conditions

<ignore-before> and <ignore-after>

With these elements, it is possible to specify conditional rendering rules. Any number of <element> nodes are allowed as children. A dist attribute determines whether the immediately preceding or following element is tested (dist="1"), or the element to the left or right of the predecessor or successor (dist="2"). The value either tests both contexts. The default value for dist is 1.

Example 1: This rule renders a hyphen before each <g> tag, except when a <w> tag appears immediately to the left:

<self>
<element name="g"/>
<ignore-after><element name="w"/></ignore-after>
<render-before>-</render-before>
</self>



Malcolm D. Hyman 2003-10-09