[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Variable scope when using imported stylesheets
It's not totally clear what your requirements are but I think that you are making the mistake (common for some reason) of thinking of variables as holding Xpath expressions, they don't; they hold _values_ (node sets in your case) so if you have a variable binding such as <xsl:variable name="ImpVehData" select="FileRefEval/FileRefVehData" /> Then the value of $ImpVehData is whatever node set results in evaluating that xpath __at the point of the declaration__. In common with most programming languages, XSLT can not store an arbitrary expression in a variable that you may re-evaluate, getting different results in different contexts. the smallest unit that you can re-evaluate in that way is a named template. Calling a named template will cause the body of the template to be evaluate in a context determined by the call. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|