val

Darwin Information Typing Architecture (DITA) Version 1.2

<val> is the root element of a DITAVAL file.

For information about processing DITAVAL files, including how to filter or flag elements with multiple property attributes or multiple properties within a single attribute, see Conditional processing (profiling).

Contains

style-conflict (optional) then (prop or revprop) (any number)

Example

Figure. Sample DITAVAL file
<val>
   <style-conflict backcolor="red"/>
   <prop action="include" att="audience" val="everybody"/>
   <prop action="flag" att="product" val="YourProd" backcolor="purple"/>
   <prop action="flag" att="product" backcolor="blue"
         color="yellow" style="underline" val="MyProd">
      <startflag imageref="startflag.jpg">
        <alt-text>This is the start of my product info</alt-text>
      </startflag>
      <endflag imageref="endflag.jpg">
        <alt-text>This is the end of my product info</alt-text>
      </endflag>
   </prop>
   <revprop action="flag" val="1.2"/>
</val>
This sample DITAVAL file performs the following actions:
  • Elements with audience="everybody" are included without change.
  • Elements with product="YourProd" get a background color of purple.
  • Elements with product="MyProd" get the following actions:
    • The image startflag.jpg is placed at the start of the element.
    • The image endflag.jpg is placed at the end of the element.
    • The element gets a background color of blue.
    • The text in the element appears in yellow, and is underlined.
  • Elements marked with are flagged with the default revision flags, which are implementation dependent.
  • When there are conflicts - such as if an element is marked with product="MyProd YourProd" - it will be flagged with a background color of red.
Figure. DITAVAL file that overrides the default "include" action
<val>
   <prop action="exclude"/>
   <prop action="include" att="audience" val="everybody"/>
   <prop action="include" att="audience" val="novice"/>
   <prop action="include" att="product" val="productA"/>
   <prop action="include" att="product" val="productB"/>
</val>
This simple DITAVAL file ditaval performs the following actions:
  • The first <prop> element does not specify an attribute, which sets a default action of "exclude" for every prop value. This means that, by default, any property value not otherwise defined in this file evaluates to "exclude". Note that this same behavior can be limited to a single attribute; the following <prop> element sets a default action of "exclude" for all properties specified on the platform attribute: <prop action="exclude" att="otherprops"/>
  • The second and third <prop> elements set an action of "include" for two values on the audience attribute. All other values on the audience attribute still evaluate to "exclude".
  • The fourth and fifth <prop> elements set an action of "include" for two values on the product attribute. All other values on the product attribute still evaluate to "exclude".