By default, the XML Composer uses strict validation, and the job fails if a violation
occurs. To customize validation, specify the action to perform when a violation occurs.
The following tables describe the validation rules and the applicable actions.
Table 1. Value validation rules
Rule |
Description |
Actions |
Data type has an illegal value |
The value must match the value rules for the data type of the corresponding
item. |
- Ignore
- Type-checking and type-conversion are not performed. The data types of the items in the Target
column of the mapping table are replaced with the String data type.
- Log per Occurrence; Log per Document
- Type-checking is performed. If a type fails the check, a log error is reported either once for
each occurrence or once for the entire document; however, parsing continues. Type-conversion is not
performed. The data types of the items in the Target column of the mapping table are replaced with
the String data type.
- Fatal
- (Default) Type-checking and type-conversion are performed. An invalid value causes the job to
fail.
|
Value fails facet constraint Note: If you enable this rule, the Data type
has an illegal value rule is also set to the same action that you choose for this
rule.
|
The value is checked against the facets of its corresponding item
type. |
- Ignore
- Facet-checking is not performed.
- Log per Occurrence; Log per Document
- Facet-checking is performed. Errors are logged.
- Fatal
- (Default) Facet-checking is performed. An invalid value causes the job to fail.
|
Item that cannot be null has a null value |
Non-nullable items are checked to ensure that they do not contain null
values. |
- Ignore
- Null-checking is not performed. All items in the Target column of the mapping table become
nullable.
- Log per Occurrence; Log per Document
- Null-checking is performed, and errors are logged. Null values are set. As a result, all items
in the Target column of the mapping table become nullable.
- Fatal
- (Default) Null-checking is performed. An invalid value causes the job to fail.
- Write no data for this value
- Null checking is not performed. In the output, no data will be written for the element i.e.
empty element will appear in the output.
|
Trim values |
Trim the white space before and after a value before performing type-checking
and type-conversion. |
- False
- Trimming is not performed.
- True
- (Default) Trimming is performed on both sides of the value.
|
Table 2. Structure validation rules
Rule |
Description |
Actions |
Mandatory item is missing |
Items must appear correctly in the instance document. Violations might occur
if a required attribute is missing or if an element appears out of order in a sequence content. |
- Ignore
- Checking for mandatory items does not occur. Error messages are not logged. As a result, all
items in Target column of the mapping table are optional and you do not need to provide a mapping
for them.
- Log per Occurrence; Log per Document
- Error messages are logged. Missing values are not filled in. As a result, all items in the
Target column of the mapping table are optional.
- Fatal
- (Default) A missing mandatory item causes the job to fail.
|
List has invalid number of occurrences |
The number of occurrences must be between the value of the MinOccurs attribute
and the MaxOccurs attribute, as defined in the schema. |
- Ignore
- No error message is logged.
- Log per Occurrence; Log per Document
- Error messages are logged.
- Reject
- The ComposingStatus item, which is added as a new group to the step Output for the XML Composer
step, is set to False and includes the corresponding error message.
- Fatal
- (Default) If the list has invalid number of occurrences, the job fails.
|