Subject: Re: Nicer way to change context-node than xsl:for-each ?
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sat, 5 Dec 2009 16:52:15 +0530
|
On Sat, Dec 5, 2009 at 4:44 PM, David Carlisle <davidc@xxxxxxxxx> wrote:
> And when you find yourself needing to call that in another context wrapping it in
> xsl:for-each is often the least intrusive change.
I agree to this.
But accomplishing a context change, via xsl:for-each looks
syntactically confusing. I wish the language had a facility for such
kind of a requirement.
The following proposal comes to my mind :)
<xsl:context ref="nodeReference">
<xsl:call-template name="xx">
</xsl:call-template>
</xsl:context>
Here, the template "xx" get's a context as node, "nodeReference".
--
Regards,
Mukul Gandhi
|