Collection 002

Tests that err:XD0001 is raised if a sequence of documents is the context for an XPath expression on a p:variable.

Test is expected to fail with error code err:XD0001.

The pipeline

<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error"
                xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
   <p:output port="result"/>
   <p:identity name="id1">
      <p:with-input port="source">
         <p:inline>
            <doc/>
         </p:inline>
      </p:with-input>
   </p:identity>
   <p:identity name="id2">
      <p:with-input port="source">
         <p:inline>
            <doc/>
         </p:inline>
      </p:with-input>
   </p:identity>
   <p:identity name="combine">
      <p:with-input port="source" pipe="@id1 @id2"/>
   </p:identity>
   <p:variable name="a" select="count(.)"/>
   <p:identity>
      <p:with-input>
         <doc>{$a}</doc>
      </p:with-input>
   </p:identity>
</p:declare-step>

Revision history

22 Apr 2019, Achim Berndzen
Adapted test to new context item strategy, new error code.
14 Oct 2018, Norman Walsh
Initial publication