XPROC how get validation errors
Posted: Sat Nov 20, 2010 8:07 pm
How retrieve validation errors from <p:validate-with-XXXX> ?
The example bellow from http://www.xfront.com/xproc/
just output INVALID, we want the errors instead!.
The example bellow from http://www.xfront.com/xproc/
just output INVALID, we want the errors instead!.
Code: Select all
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="10.0">
<p:input port="source">
<p:document href="BookStore.xml"/>
</p:input>
<p:output port="result" />
<p:try>
<p:group>
<p:validate-with-xml-schema assert-valid="true" mode="strict" name="myValidate">
<p:input port="schema">
<p:document href="BookStore.xsd"/>
</p:input>
</p:validate-with-xml-schema>
</p:group>
<p:catch>
<p:identity>
<p:input port="source">
<p:inline><c:result>invalid</c:result></p:inline>
</p:input>
</p:identity>
</p:catch>
</p:try>
</p:declare-step>