[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Question: XSL & Dynamic Changes During Run-time
It might be easier for readers and responders if you separated your questions into different messages. Anyhow: <ASIDE>Java shared class variables *are* global variables. But that doesn't really have anything to do with XSL.</ASIDE> > > Therefore, "defaultFontSize" is a global variable and > "hierarchicalIndent(elementType, element)" is a global function. > > Q1: Is this correct? Yes, but more generally, any variable whose namespace is the global one is a global variable. Since JavaScript has many tricks for manipulating namespaces, this does not just mean variables defined in a <define-script> block. And of course any variable *reached through* a global variable is also global. > Yes. Global functions don?t introduce side-effects. Global functions are global variables in JavaScript. <title>test</title> <SCRIPT> function a(){ return 5; } document.writeln( a() ) function b(){ return 10; } a = b document.writeln( a() ) </SCRIPT> Paul Prescod - http://itrc.uwaterloo.ca/~papresco [Woody Allen on Hollywood in "Annie Hall"] Annie: "It's so clean down here." Woody: "That's because they don't throw their garbage away. They make it into television shows." 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
|