W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

Re: Stylesheet modules and global variables

From: Dimitre Novatchev <dnovatchev@yahoo.com>
Date: Thu, 18 Sep 2003 12:21:46 -0700 (PDT)
Message-ID: <20030918192146.98414.qmail@web41101.mail.yahoo.com>
To: public-qt-comments@w3.org
Cc: noe_michejda@7thportal.l.pl

> XSLT spec says:
> 
> "A top-level variable-binding element declares a global variable that is
> visible everywhere (except where it is shadowed by another binding)."
> 
> So variable declared in stylesheet module which imports (or includes)
> another stylesheet module is visible also in imported module.
> 
> I think this could be big problem for creation of precompiled libraries
> used in many stylesheet - any stylesheet module can have references to
> undeclared (at time of compilation) variables.
> 
> This also applies to functions, keys, sort keys etc.
> 
> Also accidental overriding of 'private' variables and function of 
> library could be undesirable (making impossible static typing in library
> when @as attribute is different in new declaration).

This will not be a problem if library developers use the good design
practice of having names in their own and unique library-specific
namespace.




=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Received on Thursday, 18 September 2003 15:22:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC