[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Question: XSL & Dynamic Changes During Run-time

Subject: Re: Question: XSL & Dynamic Changes During Run-time
From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx>
Date: Wed, 25 Feb 1998 10:13:11 -0500
dynamic global variable javascript
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.