<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xmlns:err="http://www.w3.org/ns/xproc-error"
    expected="fail" code="err:XC0153" 
  features="p-validate-with-relax-ng">
  <t:info>
    <t:title>ab-validate-with-relax-ng-020</t:title>
    <t:revision-history>
      <t:revision>
        <t:date>2020-07-04</t:date>
        <t:author>
          <t:name>Achim Berndzen</t:name>
        </t:author>
        <t:description xmlns="http://www.w3.org/1999/xhtml">
          <p>Initial publication</p>
        </t:description>
      </t:revision>
    </t:revision-history>
  </t:info>
  <t:description xmlns="http://www.w3.org/1999/xhtml">
    <p>Tests error is raised for invalid grammar.</p>
  </t:description>
  <t:pipeline>
    <p:declare-step name="pipeline" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
      <p:output port="result"/>
      <p:validate-with-relax-ng>
        <p:with-input port="source">
          <doc>
            <title>Title</title>
            <p id="foo">Some paragraph.</p>
            <p idref="foo">Some other paragraph</p>
          </doc>
        </p:with-input>
        <p:with-input port="schema">
          <invalid />
        </p:with-input>
      </p:validate-with-relax-ng>
    </p:declare-step>
  </t:pipeline>
</t:test>