By default, the XML Parser uses minimal validation and
ignores violations. 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 types
of the items as they are defined by the schema are replaced by the
String type. For example, if the schema includes an item named startDate
that is of type Date, the type of that item in the Step Output becomes
String, not Date.
- Log per Occurrence; Log once 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 real types of the items in the Step Output are replaced by string
types.
- Reject
- Type-checking and type-conversion are performed. Only invalid
values fail the invalid document parsing. The ParsingStatus item is
added as a new group to the Step Output for the XML Parser step and
is set to False and contains the corresponding error message.
- Fatal
- Type-checking and type-conversion are performed. An invalid value
causes the job to fail.
- Convert to Default
- Type-checking and type-conversion are performed. An invalid value
is replaced with its default value.
|
Value fails facet constraint Note: If you enable
this rule, the Datatype has illegal value rule
is also set with the same value that is chosen for Value
fails facet constraint rule.
|
The value is checked against the facets of its
corresponding item type. |
- Ignore
- Facet-checking is not performed.
- Log per Occurrence; Log once per Document
- Facet-checking is performed. Log errors are issued for the violations,
and parsing continues.
- Reject
- Facet-checking is performed. Invalid values will fail only the
invalid document parsing, and the ParsingStatus item, which is added
as a new group to the step Output for the XML Parser step, is set
to False with the corresponding error message.
- Fatal
- Facet-checking is performed. An invalid value causes the job to
fail.
- Convert to Default
- Facet-checking is performed. An invalid value is replaced with
its default value.
|
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 step Output for
the XML Parser step become nullable. All items in the step output
become nullable.
- Log per Occurrence; Log once per Document
- Null-checking is performed, and log errors are issued. Null values
are set. As a result, all items in the step Output for the XML Parser
step become nullable.
- Reject
- Null-checking is performed. Invalid values will fail only the
invalid document parsing, and the ParsingStatus item, which is added
as a new group to the step Output for the XML Parser step, is set
to False and includes the corresponding error message.
- Fatal
- Null-checking is performed. An invalid value causes the job to
fail.
- Convert to Default
- Null-checking is performed. An invalid value is replaced with
its default value.
- Write no data for this value
- Null checking is not performed. The output column will contain
no data.
|
Use global default values for missing values |
Missing values are replaced with their default
values. |
- False
- If the schema defines a default value for the item, that default
value is used. Otherwise, the value is set to nil.
- True
- If the schema defines a default value for the item, that default
value is used. Otherwise, the value is set to the default value that
is specified in the Assembly Administration panel.
|
Trim values |
Trim the white space before and after a value
before performing type-checking and type-conversion. |
- False
- Trimming is not performed.
- True
- Trimming is performed on both sides of the value.
|
Table 2. Structure validation rules
Rule |
Description |
Actions |
Document is malformed |
The document is malformed. |
- Ignore
- No error message is logged.
- Log per Document
- An error message is logged.
- Reject
- The ParsingStatus item, which is added as a new group to the step
Output for the XML Parser step, is set to False and includes the corresponding
error message.
- Fatal
- A malformed document causes the job to fail.
|
Items are not declared in schema |
Items in the instance document must be declared
in the schema. Violations might occur when a job uses an out-of-date
version of a schema. |
- Ignore
- No error message is logged. Items are parsed based on best guess.
- Log per Occurrence; Log once per Document
- Error messages are logged. Items are parsed based on best guess.
- Reject
- The ParsingStatus item, which is added as a new group to the step
Output for the XML Parser step, is set to False and includes the corresponding
error message.
- Fatal
- An item that is not declared in the schema causes the job to fail.
|
Nil element has value |
Nullable items are checked to ensure that they
do not contain data values. This applies only to those items where
nullable is set to true in the xml document. |
- Ignore
- No error message is logged. Items are parsed based on best guess.
- Log per Occurrence; Log once per Document
- Error messages are logged. Items are parsed based on best guess.
- Reject
- The ParsingStatus item, which is added as a new group to the step
Output for the XML Parser step, is set to False and includes the corresponding
error message.
- Fatal
- A null element having a value causes the job to fail.
|
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. No error message
is logged. As a result, all items in the step Output become optional.
- Log per Occurrence; Log once per Document
- Error messages are logged. Parsing continues, even though data
is missing. As a result, all items in the step Output become optional.
- Reject
- The ParsingStatus item, which is added as a new group to the step
Output for the XML Parser step, is set to False and includes the corresponding
error message.
- Fatal
- 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 once per Document
- Error messages are logged.
- Reject
- The ParsingStatus item, which is added as a new group to the step
Output for the XML Parser step, is set to False and includes the corresponding
error message.
- Fatal
- If the list has invalid number of occurrences, the job fails.
|
ID values are not unique |
Each document must have a unique ID. |
- Ignore
- No error message is logged.
- Log per Occurrence; Log once per Document
- Error messages are logged.
- Reject
- The ParsingStatus item, which is added as a new group to the step
Output for the XML Parser step, is set to False and includes the corresponding
error message.
- Fatal
- Duplicate ID values cause the job to fail.
|