[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: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 4 Dec 2009 14:50:35 -0000
RE:  Nicer way to change context-node than xsl:for-each
> Usually xsl:for-each is used to process a serie of nodes, not 
> only to change the context. I know I should do an 
> apply-templates and the corresponding template-match, but 
> that would mean rewrite the entire xsl so I can't do it (for now).
> 
> This solution is ok, but if something like "xsl:with" or "xsl:context"
> exists, I'd be glad to know.

No, xsl:for-each is the way to do it. It reads oddly, but it's hard to
justify adding an additional instruction with a different name whose
semantics would be much the same.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.