Mapping Condition Expressions

In this example, the values Yes, No and Unanswered are represented as code table values and are used to record whether the person is a US Citizen or not. The value ITYN4001 corresponds to the client answering "Yes" to this question. Note the use of ", this is because the quote symbols "" cannot be used directly in XML. The syntax for conditionally mapping attributes is exactly the same.

1    <condition expression="Person.isBlind==&quot;ITYN4001&quot;">
2      <target-entity
3        name="Disability"
4        id="BlindDisabilityTarget"
5      >
6        <set-attribute
7          name="disabilityType"
8          value="DT1"
9        />
10      </target-entity>
11   </condition>