Nicer way to change context-node than xsl:for-each ?
Hi folks, In a template I want to change the context node to the first child. Here's the workaround I've found : <xsl:template match="foo"> <!-- do things with root --> <xsl:for-each select="*"> <xsl:value-of select="." /> <!-- do many other things, call templates... --> </xsl:for-each> </xsl:template> 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. Thanks for any help, Regards Frederic
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format