Inline AVTs

Test inline-avt.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:identity name="one">
      <p:with-input port="source">
         <p:inline>
            <doc>There are <t>elements</t> in here. A couple of <t>elements</t>.</doc>
         </p:inline>
      </p:with-input>
   </p:identity>
   <p:variable name="bar" select="count(//*)"/>
   <p:identity name="two">
      <p:with-input port="source">
         <p:inline>
            <doc count="{$bar}">Counts the number of nodes.
        The number of the nodes is <number>{$bar}</number>.
        <toggle class="{$bar}" p:inline-expand-text="false">{$bar}</toggle>
            </doc>
         </p:inline>
      </p:with-input>
   </p:identity>
</p:declare-step>
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="p" uri="http://www.w3.org/ns/xproc"/>
   <s:pattern>
      <s:rule context="/*">
         <s:assert test="self::doc">The pipeline root is not doc.</s:assert>
         <s:assert test="@count = 3">The number of nodes in the AVT is incorrect.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

01 Oct 2021, Norman Walsh

Updated the underlying pipeline to use p:inline-expand-text. Inlined the Schematron.

24 Sep 2017 17:47, Norman Walsh

Port my test suite; add documentation and schemas