x:apply-templates starts to live

The Scheme function "x:apply-templates" should work like the XSLT function "apply-templates". The very basic test case is passed today.

The default XSLT stylesheet is extended by the following template for elements.

<x:template match="*">
  <elem name="{name()}">
    <x:apply-templates select="*"/>
  </elem>
</x:template>

The function x:apply-templates is used as follows.

`(
 ,(x:apply-templates '(a1))
 ,(x:apply-templates '())
 ,(x:apply-templates '((a2)))
 ,(x:apply-templates '((a3) (a4) (a5 (a6))))
)

And result is as expected:

<elem name="a1"/>
<elem name="a2"/>
<elem name="a3"/><elem name="a4"/>
<elem name="a5"><elem name="a6"/></elem>
Categories: Generative XML

Updated: