Schema-Aware XSLT and XQuery from the Command Line

To run a schema-aware transformation from the command line, use appropriate options on the Transform or Query command, for example -val:strict to request strict validation of the source document, or -val:lax for lax validation. This applies not only to the principal source document loaded from the command line, but to all documents loaded via the doc() and document() functions.

When running from the command line, type annotations on constructed elements in the result tree are lost when the output is serialized.

The -outval:recover option on the command line causes validation errors encountered in processing a final result tree to be treated as warnings, allowing processing to continue. This allows more than one error to be reported in a single run. The result document is serialized as if validation were successful, but with XML comments inserted to show where the validation errors were found. This option does not necessarily recover from all validation errors, for example at present it does not recover from errors in uniqueness or referential constraints. It applies only to result trees validated using the validation attribute of xsl:result-document.