ab-validate-with-relax-ng-003
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" name="pipeline" version="3.0">
<p:output port="result"/>
<p:validate-with-relax-ng assert-valid="false">
<p:with-input port="source">
<doc>
<p>Some paragraph.</p>
</doc>
</p:with-input>
<p:with-input port="schema">
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="doc"/>
</start>
<define name="doc">
<element name="doc">
<ref name="title"/>
<zeroOrMore>
<ref name="p"/>
</zeroOrMore>
</element>
</define>
<define name="title">
<element name="title">
<text/>
</element>
</define>
<define name="p">
<element name="p">
<text/>
</element>
</define>
</grammar>
</p:with-input>
</p:validate-with-relax-ng>
<p:identity>
<p:with-input pipe="report"/>
</p:identity>
</p:declare-step>
Result
<xvrl:report xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:xvrl="http://www.xproc.org/ns/xvrl">
<xvrl:metadata>
<xvrl:timestamp>2025-06-19T18:06:09.362200145Z</xvrl:timestamp>
<xvrl:validator name="Jing" version="unknown"/>
<xvrl:creator name="XML Calabash"
version="3.0.5-SNAPSHOT"/>
<xvrl:document href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-validate-with-relax-ng-003.xml"/>
<xvrl:schema href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-validate-with-relax-ng-003.xml"
schematypens="http://relaxng.org/ns/structure/1.0" language="RNG">
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="doc"/>
</start>
<define name="doc">
<element name="doc">
<ref name="title"/>
<zeroOrMore>
<ref name="p"/>
</zeroOrMore>
</element>
</define>
<define name="title">
<element name="title">
<text/>
</element>
</define>
<define name="p">
<element name="p">
<text/>
</element>
</define>
</grammar>
</xvrl:schema>
</xvrl:metadata>
<xvrl:detection severity="error">
<xvrl:location href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-validate-with-relax-ng-003.xml"
line="2" column="22"/>
<xvrl:message>element "p" not allowed yet; missing required element "title"</xvrl:message>
</xvrl:detection>
<xvrl:digest valid="false" fatal-error-count="0"
error-count="1" warning-count="0" info-count="0"
unspecified-count="0" fatal-error-codes="" error-codes=""
warning-codes="" info-codes="" unspecified-codes=""
worst="error"/>
</xvrl:report>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="*">No document created on report port in the error case.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
Added attribute 'queryBinding' to schematron's schema. - 02 Aug 2019, Achim Berndzen
Initial publication