Example: Filtering and flagging topic content

A publisher might want to flag information that applies to administrators, and to exclude information that applies to the extended product.

Consider the following DITA source fragment and conditional processing profile:

DITA source fragment

<p audience="administrator">Set the configuration options:
  <ul>
    <li product="extendedprod">Set foo to bar</li>
    <li product="basicprod extendedprod">Set your blink rate</li>
    <li>Do some other stuff</li>
    <li>Do a special thing for Linux</li>
  </ul>
</p>

DITAVAL profile

<val>
  <prop att="audience" val="administrator" action="flag">
    <startflag><alt-text>ADMIN</alt-text></startflag>
  </prop>
  <prop att="product" val="extendedprod" action="exclude"/>
</val>

When the content is rendered, the paragraph is flagged, and the first list item is excluded (since it applies to extendedprod). The second list item is still included; even though it does apply to extendedprod, it also applies to basicprod, which was not excluded.

The result should look something like the following:

ADMIN Set the configuration options:

  • Set your blink rate
  • Do some other stuff
  • Do a special thing for Linux

Was this helpful?