Basic test, standard grammar: assert-valid="true", test error raised
Test ab-validate-with-relax-ng-004.xml is expected to fail with error code err:XC0053
.
It requires the following features: p-validate-with-relax-ng.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
<p:output port="result"/>
<p:validate-with-relax-ng assert-valid="true">
<p:with-input port="source">
<doc xmlns="">
<p>Some paragraph.</p>
</doc>
</p:with-input>
<p:with-input port="schema">
<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
<start xmlns="http://relaxng.org/ns/structure/1.0">
<ref xmlns="http://relaxng.org/ns/structure/1.0" name="doc"/>
</start>
<define xmlns="http://relaxng.org/ns/structure/1.0" name="doc">
<element xmlns="http://relaxng.org/ns/structure/1.0" name="doc">
<ref xmlns="http://relaxng.org/ns/structure/1.0" name="title"/>
<zeroOrMore xmlns="http://relaxng.org/ns/structure/1.0">
<ref xmlns="http://relaxng.org/ns/structure/1.0" name="p"/>
</zeroOrMore>
</element>
</define>
<define xmlns="http://relaxng.org/ns/structure/1.0" name="title">
<element xmlns="http://relaxng.org/ns/structure/1.0" name="title">
<text xmlns="http://relaxng.org/ns/structure/1.0"/>
</element>
</define>
<define xmlns="http://relaxng.org/ns/structure/1.0" name="p">
<element xmlns="http://relaxng.org/ns/structure/1.0" name="p">
<text xmlns="http://relaxng.org/ns/structure/1.0"/>
</element>
</define>
</grammar>
</p:with-input>
</p:validate-with-relax-ng>
<p:identity>
<p:with-input pipe="report"/>
</p:identity>
</p:declare-step>
Initial publication