[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Nicer way to change context-node than xsl:for-each

Subject: Re: Nicer way to change context-node than xsl:for-each ?
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sat, 5 Dec 2009 16:22:57 +0530
Re:  Nicer way to change context-node than xsl:for-each
On Sat, Dec 5, 2009 at 3:55 PM, David Carlisle <davidc@xxxxxxxxx> wrote:
>> <xsl:template match="foo">
>> B <xsl:variable name="x" select="*[1]" />
>> B <xsl:value-of select="$x" />
>> B <!-- can do other things, on "x" -->
>> </xsl:template>
> the for-each wasn't needed for value-of but it is needed to change the
> context for call-template, which the original post indicated was also
> required.

seems, I misunderstood the requirements.

If a change in context was required for call-template, I might have
modeled this, by having another parameter for *[1] on call-template
(which might be a better design decision, as it encourages loose
coupling!), instead of modeling this requirement as a loop.

Mukul Gandhi

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.