Fallback Semantics for Attributes

To determine the value of an attribute, the <attr> definitions for that attribute are processed one by one in order of appearance within the parent tag. For each definition, all combinations of variables used within it are enumerated, and all non-fail values produced are collected into a set:

This behavior provides a way to determine if the variable has a specific value in its value set. The following example sets the attribute to False if the first parameter can be undefined, to True otherwise:

<attr name='Completed' switch-var='%1'>
  <undef value='False'/>
</attr>
<attr name='Completed' value='True'/>