I propose introducing apply-templates() as an xslt-only function, with semantics broadly equivalent to the xsl:apply-templates instruction.
The main use case identified so far is when constructing maps and arrays, it enables the XPath syntax to be used rather than the much more verbose XSLT syntax.
Parameters:
- select: the items to be processed using matching template rules
- with-params: the parameters to be passed. Like with-params on xsl:evaluate, this means variable names exist at run-time, which is a bit of an innovation, but I think it's manageable
- mode: again, this means mode names exist at run-time, which may have consequences. There are open questions about what the default should be, or how the various options (default mode, unnamed mode, current mode) should be expressed.
I propose introducing
apply-templates()as an xslt-only function, with semantics broadly equivalent to thexsl:apply-templatesinstruction.The main use case identified so far is when constructing maps and arrays, it enables the XPath syntax to be used rather than the much more verbose XSLT syntax.
Parameters: