TVT elements in text

Test nw-inline-expand-text-007.xml is expected to pass.

The pipeline


<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:variable name="var" select=".">
      <p:inline>
         <element>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="http://www.w3.org/1999/xhtml" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <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

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

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.