Static variables/option 049

Tests that a static variable can be used in inline binding of a static variable.

Test ab-static-option-var-049.xml is expected to pass.

The pipeline


        <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
            <p:output port="result"/>
            
            <p:variable static="true" name="var1" select="5"/>
            <p:variable static="true" name="var2" select="/doc/text()">
                <doc xmlns="">{$var1}</doc>
            </p:variable>
            
            <p:identity>
                <p:with-input>
                    <doc2 xmlns="">{$var2}</doc2>
                </p:with-input>
            </p:identity>
        </p:declare-step>
    
MorganaXProc passing XML Calabash failing

Schematron validation


        <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
            <s:pattern>
                <s:rule context="/">
                    <s:assert test="doc2">The pipeline root is not doc2.</s:assert>
                    <s:assert test="count(doc2/node())=1">The root element does not have exactly one child.</s:assert>
                    <s:assert test="count(doc2/text())=1">The root element does not have exactly one text child.</s:assert>
                    <s:assert test="doc2/text()='5'">The root element does not have a text child 'true'.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>        
    

Revision history

13 Oct 2018, Achim Berndzen

Initial test