|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|

Cart








