Adding a user-defined variable
You can use a user-defined variable to specify a value
in your DFDL schema that is used in parsing your message, but varies
between messages. Variables are defined as top-level annotations in
a schema. A variable holds a value that can be set once, and then
accessed from DFDL expressions in property values, asserts, and discriminators.
Before you begin
Create or open
a DFDL schema file. See
DFDL schema editor for a description
of the
DFDL schema editor.
Procedure
- In the Outline view, right-click Variables,
then select Add a Variable Definition.
- Type a name and select a data type for your user-defined
variable.
- Edit the default value of your new variable.
- Save your message model.
Results
Your user-defined variable is added to the DFDL schema.
What to do next
Add your user-defined variable to a DFDL schema object. See
Setting variables on a schema object.