Adding a discriminator to a schema object
You can add a discriminator to a DFDL schema object to enable the DFDL parser to resolve a point of uncertainty.
Before you begin
Procedure
- In the Editor view, select the DFDL schema object on which you want to add a discriminator.
- On the Asserts and Discriminators tab
of the DFDL Properties area, select Discriminators,
then click Add discriminator. If an assert
is already applied to the object, the Discriminators option
is disabled, as an object cannot have both an assert and a discriminator
applied to it. A new entry in the table is created.
- Enter your test expression in the Test Condition field,
and a human-readable failure message in the Message field.
Content assistance is available for the Test Condition field; press Ctrl+Space to open the XPath Expression Builder.
- Save your message model.