TVT elements in text

Test nw-inline-expand-text-007.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:variable name="var" select=".">
         <p:inline><element xmlns="">test</element></p:inline>
       </p:variable>

       <p:identity>
         <p:with-input port="source">
           <p:inline content-type="text/plain">{$var}</p:inline>
         </p:with-input>
       </p:identity>
       
       <p:wrap-sequence wrapper="result"/>
     </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="result">The root element is not result.</s:assert>
        <s:assert test="result/text() = 'test'">The text child of root element is not 'test'.</s:assert>
     </s:rule>
    </s:pattern>
  </s:schema>

Revision history

20 Jul 2019, Achim Berndzen

Wrapped text document in an element to make schematron test possible.

19 Jul 2019, Norman Walsh

Test that elements are handled correctly in TVTs when the content-type is text.