issue-cb-661-001

Tests that the “weldedShut” bug is fixed.

Test issue-661-001.xml is expected to pass.

The pipeline

<p:declare-step xmlns:mySteps="http://www.example.com/mySteps" xmlns:p="http://www.w3.org/ns/xproc" 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"/>
      <!-- Not used -->
      <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>
      <!-- Use named template -->
         <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>

Schematron validation

<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" 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.