Processing controlled attribute values
The following algorithm applies when processors apply filtering and flagging rules to attribute values that are defined as a hierarchy of controlled values and bound to an enumeration:
- If an attribute specifies a value in the taxonomy, and a DITAVAL or other categorization tool is configured with that value, the rule matches.
- Otherwise, if the parent value in the taxonomy has a rule, that matches.
- Otherwise, continue up the chain in the taxonomy until a matching rule is found.
The following behavior is expected of processors:
- Processors SHOULD be aware of the hierarchies of attribute values that are defined in subject scheme maps for purposes of filtering, flagging, or other metadata-based categorization.
- Processors SHOULD validate that the values of attributes that are bound to controlled values contain only valid values from those sets. (The list of controlled values is not validated by basic XML parsers.) If the controlled values are part of a named key scope, the scope name is ignored for the purpose of validating the controlled values.
- Processors SHOULD check that all values listed for an attribute in a DITAVAL file are bound to the attribute by the subject scheme before filtering or flagging. If a processor encounters values that are not included in the subject scheme, it SHOULD issue a warning.
Example: A hierarchy of controlled values and conditional processing
The following example illustrates a set of controlled values that contains a hierarchy.
<subjectScheme> <subjectdef keys="users"> <subjectdef keys="therapist"> <subjectdef keys="novice-therapist"/> <subjectdef keys="expert-therapist"/> </subjectdef> <subjectdef keys="oncologist"/> <subjectdef keys="physicist"/> <subjectdef keys="radiologist"/> </subjectdef> <enumerationdef> <attributedef name="audience"/> <subjectdef keyref="users"/> </enumerationdef> </subjectScheme>
Processors that are aware of the hierarchy that is defined in the subject scheme map will handle filtering and flagging in the following ways:
- If "therapist" is excluded, both "novice-therapist" and "expert-therapist" are by default excluded (unless they are explicitly set to be included).
- If "therapist" is flagged and "novice-therapist" is not explicitly flagged, processors automatically should flag "novice" since it is a type of therapist.