Managing unknown operators on attributes and elements
XML objects can have unknown attributes or elements. In
IRL, you can check for the isknown or unknown operators. In BAL, these
operators do not exist.
About this task
In Java™ objects,
the isknown attribute
returns true even if the
attribute or element is equal to null.
In contrast, XML objects can have optional attributes or elements
that are unknown.
An
optional XML attribute or element is unknown in
the XML document if the following conditions are met:
The value is not given.
The value is explicitly set to
xsi:nil
In the ILOG® Rule Language
(IRL), you can check whether there is a value for optional attributes
using the isknown and isunknown operators and, if there
is, retrieve it.
The operators isknown and isunknown do not exist in the
Business Action Language (BAL). To apply these operators, you need
to create a method in the BOM, then use BOM to XOM mapping. The following
example shows an example for a lastName attribute.
Procedure
To apply the isknown/isunknown operators: