I have many functions that takes in one input, e.g.:
<xsl:template name="F">
<xsl:param name="input"/>
... ...
</xsl:template>
To call the function, I need to write:
<xsl:call-template name="F">
<xsl:with-param name="input" select="'jkljkljkl'"/>
</xsl:call-template>
This seems overly verbose. Since the function has only one parameter, why do we have to write the xsl:with-param node?
Is there a shortcut for calling one-parameter functions?
I want to be able to do something like this:
<xsl:call-template name="F" select-param="'jkljkl'"/>
It’s short and sweet and equally non-ambiguous (since there’s only one parameter). How can we call one-parameter functions in a short and sweet way?
Am looking for a solution in both XSLT 1.0 and XSLT 2.0.
In XSLT 2.0 you can write your own functions by:
xsl:functiondeclaration.Example: