XSD validator

Description

The XSD validator validates an XML files against an internal (defined in the XML file) or external (defined in a separate xsd file) XML schema.

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.

Options

Option Description

Action name

The name of the workflow action.

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 that points to an external DTD, or an external entity, in the XML being validated is refused and the action fails. A DOCTYPE with only internal declarations is accepted.

  • XSD sources none (default) and is defined inside XML do not work: the xsi:schemaLocation / xsi:noNamespaceSchemaLocation reference is not resolved, not even when it points at a local file. Both options need 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 actions can be changed with the ALLOW_EXTERNAL_ENTITIES_FOR_XSD_VALIDATION Java system property.

XSD Source

The options are

  • none (default) - requires Enable external entity for XSD validation

  • is a file, let me specify filename

  • is defined inside XML - requires Enable external entity for XSD validation

XML File name

The name of the XML file

XSD File name

The name of the XSD file

Result

What this action passes on to the next action. See Action results for how results travel through a workflow.

Result Value

True

The XML file is valid against the schema, with 0 errors.

False

The XML file is not valid, the XML file or the XSD file doesn’t exist, or the action refuses the file because Enable external entity for XSD validation is unchecked (see the option above). The number of errors is 1.

Result files

Passed on unchanged.

Result rows

Passed on unchanged.