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

RE: variable question

Subject: RE: variable question
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Thu, 30 Dec 1999 16:21:47 -0700
RE: variable question
> > As you have discovered, a variable assignment only has
> > scope along the descendant and following-sibling axes.

I guess that's not exactly what I wanted to say. Relative to the variable
binding element, the variable is in scope for the following-sibling axis,
and for the descendant axis relative to each of those following-siblings.
 
> Based on that, why didn't setting the variable in the
> root template make it in scope for all the child templates?

Because templates invoked via call-templates or apply-templates are not
children of the template in which the invocation takes place. All
xsl:template elements are siblings of each other. This relationship has
nothing to do with the order in which the templates are acted upon.

In other words, for a given node in the stylesheet tree, you can determine,
by looking "up" the tree, what variables are in scope without having to know
how you arrived at that particular node.


 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.