Home
XSLT Processor
Website Editor
CGI XSLT Processor
The style and source
Global parameters
Stylesheets
Stylesheet elements
Functions
Files upload
Details
Characters model
Data types
Result tree fragments
Variables scope
Conflict resolution
The key function
The document function
Curly brackets in attributes
Extensions
Extension modules
XSL message handlers
XML tree class
Variables and parameters scope

The local variable (parameter) declared is visible until the end of the block. Any template called after the variable declaration will see this variable. In particular, if the variable is defined in the entry point of the stylesheet (template with match="/") you can refer to it in any template. Technically, the variable stack is not created for each template. Of course, you can overwrite the value of the variable at any place of the stylesheet. Its old value will be restored after the end of the block. This method was found to be useful and safe since Stylesheet Language XSLT has no assignment operator and XSLT program cannot damage the variable.
Copyright © 2004 www.dopscripts.com