Previous: , Up: Program XML   [Contents][Index]

7.2.2 Specifying Predicates

Object predicates (see Predicate System) are specified using the ‘@when’ attribute of certain nodes. It must contain a string of references understood by the system (see domain of discourse, Predicate System), all of which much match for the predicate to be true.

  <question id="describe" type="noyes"
            label="Any special notes for this location?" />

  <question id="vacant_desc" type="textarea"
            when="q:describe vacant property"
            label="Show only when a vacant property with the
                   question 'describe' non-empty and non-zero" />

Figure 7.4: Using the ‘@when’ attribute

In Figure 7.4 above, question ‘vacant_desc’ will be applicable when all of the values of ‘vacant’, ‘property’, and ‘q:describe’ are true.19 Within the context of the Program XML, this concretely means that the classifications ‘vacant’ and ‘property’ are true, and that the question ‘describe’ is answered “yes”. It reads as a sentence: “‘vacant_desc’” is applicable when we should  “describe a vacant property”.



See Predicate System for what “true” means for a particular variable in the domain of discourse.