A rule’s conditions determine to which portions of your document a rule applies, allowing you to set the right annotations at the right spots.
Overview #
The condition is the most complex part of a rule. The trick to a successful conversion with Migrate is to apply the correct annotations at the right places. Conditions allow you to identify these right places. In the end, a condition will evaluate to either true or false. The rule’s annotations will be applied if, and only if, the condition evaluates to true.
To provide agility and precision, Migrate supports several types of tests which can be used in conditions:
- style test
- property test
- logical group test
- content test
- context test
- contains element test
Migrate also provides mechanisms that allow you to consolidate what might have been several rules into one so that you don’t have to repeat yourself. This also keeps rule sets simpler and easier to understand.
- case construct
- for each construct