Test select on p:with-input select="text()"

Test ab-with-input-select-004.xml is expected to pass.

The pipeline

<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
      <p:with-input select="*/text()">
                  <!-- A comment -->
            <element1 att="att"/>
            <?pi target?>
                        A text node
   <p:wrap-sequence wrapper="c:result"/>
MorganaXProc passing XML Calabash passing

Schematron validation

<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
      <s:rule context="/">
         <s:assert test="count(*) = 1">Document does not have exactly one child element.</s:assert>
         <s:assert test="*[1]/name()='c:result'">Root element is not named 'c:result'.</s:assert>
      <s:rule context="/c:result">
         <s:assert test="count(node())=count(text())">c:result does not have only text node children.</s:assert>
         <s:assert test="normalize-space(string-join(text(),''))='A text node'">The normalized text is not 'A next node'.</s:assert>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

12 Oct 2018, Achim Berndzen

Fixing broken test (namespace removed)

02 Feb 2018 17:42, Achim Berndzen

added new tests