Re: [xsl] [xslt 2.0] Difference betwen functions and templates

Subject: Re: [xsl] [xslt 2.0] Difference betwen functions and templates
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 19 Jul 2007 19:11:17 +0530
On 7/19/07, Justin Johansson <procode@xxxxxxxxxx> wrote:
The bottom line is that named templates and functions are essentially
the same thing and it would have been possible for XSLT 2.0 to do
away with either xsl:call-template or xsl:function.

They probably look similar, but IMHO both are useful members of XSLT 2.0. As you also said, xsl:function can be called from within an XPath expression (and, this is a very important difference) while xsl:template cannot be.

I feel, having xsl:template in XSLT 2.0 is very important, for XSLT
2.0 to be backward compatible with XSLT 1.0.

And of course, xsl:function is really beneficial, as also stated by
others in this thread.

--
Regards,
Mukul Gandhi

Current Thread