XSD Validator transform Icon XSD Validator

Description

The XSD Validator transform performs an XSD validation against data in a file or in an input field.

XSD is short for XML Schema Definition.

As such, there are 2 entities at work here:

  • The XML you want to validate the layout for

  • The XSD (Schema) file that describes what the XML file should look like.

To make matters more complex, it’s possible to store the XSD inside the XML itself.

Options

Option Description

Transform name

Name of the transform.

XML Source

  • XML source is a file : check this if the XML file is defined as a filename in the XML field

  • XML field : the field to read that contains the XML filename or the XML content itself

Output fields

  • Result fieldname : the name of the result field

  • Output String field : check this option if you want to specify specific messages after validation:

    • Display if XML is valid : the message if the XML was valid.

    • Display if XML is not valid : the message if the XML wasn’t valid.

  • Add validation msg in output : check this if you want to add a validation message in the output.

  • Validation msg field: the name of the validation message field.

Enable external entity for XSD validation

Allow the XSD validation to resolve external references (XXE). Unchecked by default, which has three effects:

  • A DOCTYPE declaration or an external entity in the XML being validated is refused and the row is reported as invalid.

  • XSD source The XSD source is defined inside the source XML does not work: the xsi:schemaLocation / xsi:noNamespaceSchemaLocation reference is not resolved, not even when it points at a local file. This option needs the checkbox.

  • A schema that pulls in another schema over the network with xs:include or xs:import (for example the W3C xml.xsd) needs the checkbox. Local file and relative includes keep working without it.

Only check this when the XML documents and the schemas you validate against are trusted. The default for new transforms can be changed with the ALLOW_EXTERNAL_ENTITIES_FOR_XSD_VALIDATION Java system property.

XML schema definition

XSD source : select one of these options:

  • The XSD source is a file, let me specify the filename (specify below in the XSD filename field).

  • The XSD source is a file, defined in a field (specify below in the XSD filename field).

  • The XSD source is defined inside the source XML. Requires Enable external entity for XSD validation.