Subject: Re: Nicer way to change context-node than xsl:for-each ?
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sun, 6 Dec 2009 07:43:02 +0530
|
Thanks, Dimitre.
On Sat, Dec 5, 2009 at 10:52 PM, Dimitre Novatchev <dnovatchev@xxxxxxxxx>
wrote:
> B <xsl:variable name="x" select="my:foo(bar)" as="appropriate type"/>
>
> or
>
> B <xsl:variable name="x">
> B B B B <xsl:sequence select="my:foo(bar)"/>
> B </xsl:variable>
That's great :)
I guess, xsl:call-template is retained in XSLT 2.0 due to backward
compatibility with XSLT 1.
xsl:call-template looks to me like a "procedure" (it computes, and
provides the result where it's called. It looks to me like an
executable macro, having access to all XSLT 2 instructions available
in a sequence constructor, with parameter support!), while
xsl:function looks *like a function* in traditional sense (with a
capability to return something).
I can also see, that call-template can have tunnel parameters, while
xsl:function cannot.
For sure, I can see overlaps in capabilities of xsl:function and
call-template. But xsl:call-template has been enhanced, that it's 1.0
version.
> It is not "semi pull style". Its pull style when only one template has
> that mode or matches a node from a uniquely defined namespace (used
> only for the purpose of identifying its matching template).
Thanks, for the explanation.
> Hey, where did I say that you were "entirely wrong" or just "wrong" ?
sorry, about that :)
--
Regards,
Mukul Gandhi
|