Glossary · Conditional processing
DITAVAL
Also known as: DITAVAL file, .ditaval, filter file
In DITA, a DITAVAL file is an XML document with the root element <val> that specifies conditional processing rules: for each attribute value it states whether content is included, excluded, passed through or flagged in the output.
- DITA
- Conditional processing
In one sentence
A DITAVAL file lists conditional processing rules: for each attribute value, whether content is included, excluded, passed through or flagged.
Example
novice.ditaval excludes all content with audience="expert"; publishing the same map with and without it yields a novice and a complete edition.
How it applies
- Technical documentation: A DITAVAL file is the “profile” for a publication run. It is kept outside the content, so the same topics can be published with different DITAVAL files.
- Rules: A
<val>element contains<prop>rules with@att,@valand@action(include,exclude,passthroughorflag) and<revprop>rules for@rev. Flags can set@color,@backcolor,@styleor start and end images (<startflags>,<endflags>). - Logic: Content is included by default. An element is excluded if, for any attribute, all of its values are excluded. Values of the same attribute are combined with “or”, different attributes with “and”.
- AI and retrieval: Keep the DITAVAL file with the index. It documents which variant of the content a chunk represents and allows the same filtering to be applied to questions from different readers.
DITAVAL vs. subject scheme map
A subject scheme map defines which values an attribute may have. A DITAVAL file decides what happens to content with a given value in one publication.
In DITAVAL markup
<val>
<prop att="audience" val="expert" action="exclude"/>
<prop att="platform" val="windows" action="exclude"/>
<prop att="product" val="ap300" action="flag" backcolor="yellow"/>
</val>