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

RE: Accessing a variable defined in the parent node

Subject: RE: Accessing a variable defined in the parent node
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 21 Nov 2003 07:59:39 -0000
xslt parent node
> If I have
> 
> <xsl:template match="direcciones">
>   <xsl:param name="source" />
>   <xsl:apply-templates select="ROWSET" />
> </xsl:template>
> 
> <xsl:template match="direcciones/ROWSET">
>   <!-- I want to access here "source" variable without the 
> need of re-passing it as parameter --> </xsl:template>
> 
> How can I do it?
> 

You can't; though if you're using Saxon 7.x and XSLT 2.0 you might like
to look at how the new facility called "tunnel parameters" can help you.

Your subject line, incidentally, suggests that you are still a bit
muddled about XSLT concepts. The variable is not defined "in the parent
node". It is defined in the template rule that matches the parent node.

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.