Name

p:validate-with-xml-schema — The standard p:validate-with-xml-schema step.

Synopsis

The p:validate-with-xml-schema step applies W3C XML Schema: Part 1 validity assessment to the source input.

Input portPrimarySequenceContent types
source✔  xml html 
schema ✔ xml 
Output portPrimarySequenceContent types
result✔  xml html 
report ✔ xml json 
Option nameTypeValuesDefault value
assert-validxs:boolean true()
modexs:string('strict','lax') 'strict'
parametersmap(xs:QName,item()*)? ()
report-formatxs:string 'xvrl'
try-namespacesxs:boolean false()
use-location-hintsxs:boolean false()
versionxs:string? ()
Declaration
 1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" type="p:validate-with-xml-schema">
   |   <p:input port="source" primary="true" content-types="xml html"/>
   |   <p:input port="schema" sequence="true" content-types="xml"/>
   |   <p:output port="result" primary="true" content-types="xml html"/>
 5 |   <p:output port="report" sequence="true" content-types="xml json"/>
   |   <p:option name="use-location-hints" select="false()" as="xs:boolean"/>
   |   <p:option name="try-namespaces" select="false()" as="xs:boolean"/>
   |   <p:option name="assert-valid" select="true()" as="xs:boolean"/>
   |   <p:option name="parameters" as="map(xs:QName,item()*)?"/>
10 |   <p:option name="mode" select="'strict'" values="('strict','lax')"/>
   |   <p:option name="version" as="xs:string?"/>
   |   <p:option name="report-format" select="'xvrl'" as="xs:string"/>
   |</p:declare-step>
Errors
CodeDescription
err:XC0011It is a dynamic error (err:XC0011) if the specified schema version is not available.
err:XC0055It is a dynamic error (err:XC0055) if the implementation does not support the specified mode.
err:XC0152It is a dynamic error (err:XC0152) if the document supplied on schema port is not a valid XML schema document.
err:XC0156It is a dynamic error (err:XC0156) if the assert-valid option on p:validate-with-xml-schema is true and the input document is not valid.
Implementation defined features
  • It is implementation-defined if the documents supplied on the schemas port are considered when resolving xs:include elements in the schema documents provided.

Description

The p:validate-with-xml-schema step is a standard XProc 3.1 step. It is also described on XProcRef.org.

Line numbering

If validation errors occur and there are no line numbers in the reported errors, make sure that the line numbering feature is enabled globally in the configuration or when the validated document is loaded.