Include and exclude filtering actions
In typical publishing tools, filtering and flagging actions to be taken during processing are defined in a ditaval file.
- exclude
- exclude from the output any elements with the specified metadata attributes
- flag
- highlight, with a text colour, background colour, or image, any elements with the specified metadata attributes
- passthough
- ignore the attribute, but leave the attribute in place in the output
- include
- include from the output any elements with the specified metadata attributes
<prop att="product" val="impress" action="flag">
<startflag imageref="delta_olive.gif">
<alt-text>Start of product - Impress</alt-text>
</startflag>
</prop>
Despite there being an include action in the ditaval logic, there is no purpose for this action. By default, all content is included. Even within a nested set of elements, a higher level element marked as include will have no affect even if lower level elements are marked with exclude. By default, no content is flagged.
Attributes are used to mark elements that are specific or individual to a particular product, platform, audience or other requirement. You only mark up those elements that you want the ability to exclude or flag.
If you are using multiple conditions (that is, more
than one value in the same attribute, such as
audience="admin manager"
), only if all exclude
conditions are satisfied will the element will be excluded from the output. In
other words, all exclude conditions have to be satisfied for the element to be
excluded from the output. So if a paragraph was marked with values of
admin and
manager, and the ditaval specified that
admin should be excluded, but
manager included, the paragraph would be included.
<prop action="exclude" />