Subject: Re: Question: XSL & Dynamic Changes During Run-time From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx> Date: Wed, 25 Feb 1998 10:13:11 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Question: XSL & Dynamic Changes, Jonathan Marsh | Thread | RE: Question: XSL & Dynamic Changes, Jonathan Marsh |
RE: More XSL Discussion, James K. Tauber | Date | Re: More XSL Discussion, Paul Prescod |
Month |