with-input-select-001

Test select on p:with-input select="."

Test ab-with-input-select-001.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:identity>
                <p:with-input select=".">
                    <doc xmlns="">
                  <element1 att="att"/>
                  
                        A text node
                        <element2/>
               </doc>
                </p:with-input>
            </p:identity>
        </p:declare-step>
   
MorganaXProc passing XML Calabash passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="count(*) = 1">Document does not have exactly one child element.</s:assert>
               <s:assert test="count(doc)=1">Root element is not named 'doc'.</s:assert>
            </s:rule>
            <s:rule context="/doc">
               <s:assert test="count(*) = 2">Root element does not have 2 child elements.</s:assert>
               <s:assert test="*[1]/name()='element1'">First child element is not called 'element1'.</s:assert>
               <s:assert test="*[2]/name()='element2'">Second child element is not called 'element2'.</s:assert>
               <s:assert test="count(comment())=1">Root element does not have one comment as child.</s:assert>
               <s:assert test="count(processing-instruction(target))=1"/>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

02 Feb 2018 17:42, Achim Berndzen

added new tests