Declare-step-012 (AB)

Tests that names of declared steps are correctly scoped.

Test ab-declare-step-012.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
      <p:output port="result"/>
      
      <p:declare-step type="test:step-1">
         <p:output port="result"/>
         
         <p:declare-step type="test:step-2">		
            <p:output port="result"/>
            
            <p:identity>
               <p:with-input><doc xmlns=""/></p:with-input>
            </p:identity>
         </p:declare-step>
         
         <test:step-2 xmlns:test="http://test"/>
      </p:declare-step>
      
      <p:declare-step type="test:step-2">
         <p:output port="result"/>
         
         <p:identity>
            <p:with-input><doc1 xmlns=""/></p:with-input>
         </p:identity>
      </p:declare-step>
      
      <test:step-1 xmlns:test="http://test" name="one"/>	
      <test:step-2 xmlns:test="http://test" name="two"/>
      
      <p:wrap-sequence wrapper="result">
         <p:with-input pipe="@one @two"/>
      </p:wrap-sequence>
      </p:declare-step>
   
MorganaXProc passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="result">The document root is not 'result'.</s:assert>
               <s:assert test="count(result/*) = 2">Result does not have two children.</s:assert>
               <s:assert test="result/*[1]/name()='doc'">First child of result is 'doc'.</s:assert>
               <s:assert test="result/*[2]/name()='doc1'">First child of result is 'doc1'.</s:assert>
             </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

27 Feb 2019, Achim Berndzen

Added new tests for p:declare-step and p:import.