XML Validator
Usage
For any incoming XML files, the XML Validator checks the following:
-
Validating whether the XML file is well-formed
-
Validity according to an internal/external XML schema
As the schema validation in INUBIT is based on XSD 1.1, both characters
^
and$
standing for start and end of line in regular expression patterns must not be used in the XSD. -
Validity according to an internal/external DTD
Depending on the DTDs (or the XML schema’s) size and the location where the file can be accessed, the XML Validator module can have a negative impact on the INUBIT Process Engine’s performance. To minimize this impact, you should save the DTD (or the schema) locally instead of making it available via a Web server or an external address (such as HTTP or FTP). |
Validator results
Depending on the validation results, processing of input messages proceeds as follows:
-
Validation was successful
The input message is forwarded as output message without any changes.
-
Validation failed
The input message is forwarded as follows:
<Validation> <Errors> <Error>[error message]</Error> </Errors> <OriginalDocument> [content of the input message] </OriginalDocument> </Validation>
XML Validator Properties Dialog
This dialog offers the following options:
Verification of input message
-
Verify only if input message contains well-formed XML
When activated, the module only checks whether the input messages are consistent with the XML rules. For example:
-
Each message must have exactly one root element.
-
Each element with content has one start and one end tag.
-
Start and end tags are twin nested.
-
No element owns several attributes with the same name.
If the verification fails, the error exit is used.
-
-
Validate input message against XML Schema
When activated, the input messages are validated against the XML Schemas which are contained or referenced in the input messages.
-
Validate input message against DTD
When activated, the input messages are validated against the DTD which are contained or referenced in the input messages.
-
Validate input message against Schematron
When activated, the input messages are validated against Schematron which are contained or referenced in the input messages.
Use external XML Schema /DTD/Schematron
For validating input messages against an XML Schema, a DTD, or Schematron which is referenced by an URI or loaded into the module statically:
-
URI
The file can be accesses via http, ftp or file protocol, e.g.:
-
file:///usr/local/schema/test.xsd
-
http://www.inubit.com/schema/test.xsd
-
file:///c:/example.xsd
-
-
Static file
After loading the file name, the file size and the file’s MIME type are displayed in the dialog.
-
Cache XML Schema/DTD/Schematron
In order to improve the module’s performance, files are pre-compiled and kept in the working memory.
Further settings
-
Break validation when finding the first error
The validation stops as soon as the first error is found. The rest of the message is not checked.
For Schematron, the break validation is not applied.
-
Use error branch as output for the validation error
If the validation fails and the Technical Workflow includes an error branch, this branch is activated.