issue-cb-661-001

Tests that the “weldedShut” bug is fixed.

Test is expected to pass.

The pipeline

<p:declare-step xmlns:mySteps="http://www.example.com/mySteps"
                xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.1">
   <p:input port="source">
      <p:inline>
         <xslt>
            <input>../documents/document.xml</input>
            <stylesheet>../documents/identity.xsl</stylesheet>
         </xslt>
      </p:inline>
   </p:input>
   <p:output port="result"/>
   <p:declare-step type="mySteps:Transform"
                   name="myTransformStep">
      <p:input port="source" primary="true"
               sequence="true"/>
      <p:input port="stylesheet" primary="false"/>
      <p:output port="result" primary="true"/>
      <p:option name="template-name"/>
      
      <p:xslt name="myXsltTransform">
         <p:with-input port="stylesheet"
                       pipe="stylesheet"/>
      </p:xslt>
   </p:declare-step>
   <p:choose name="transform">
      <p:when test="xslt/input">
         <mySteps:Transform p:message="+++++++ With input"
                            name="INWHEN">
            <p:with-input port="source"
                          href="{xslt/input}"/>
            <p:with-input port="stylesheet"
                          href="{xslt/stylesheet}"/>
         </mySteps:Transform>
      </p:when>
      <p:otherwise>
         <mySteps:Transform p:message="+++++++ Empty input"
                            name="INOTHER">
            <p:with-input port="source">
               <p:empty/>
            </p:with-input>
            <p:with-input port="stylesheet"
                          href="{xslt/stylesheet}"/>
            <p:with-option name="template-name"
                           select="xslt/@template"/>
         </mySteps:Transform>
      </p:otherwise>
   </p:choose>
</p:declare-step>

Result

<document xmlns:t="http://xproc.org/ns/testsuite/3.0">
   <title>Sample XML document</title>
   <p>Hello, world.</p>
</document>

Schematron checks

<s:schema 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="document">The document root is not correct.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

19 Apr 2026, Norm Tovey-Walsh
Created test.