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

RE: Stylesheet modules and global variables

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 17 Sep 2003 15:48:54 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD12A@daemsg02.software-ag.de>
To: noe_michejda@7thportal.l.pl, public-qt-comments@w3.org
The way that multiple modules work in XSLT was established in XSLT 1.0 and
isn't something we can easily change. It is true that the chosen approach
makes it quite difficult to do separate compilation of stylesheet modules.
I'm sure it's not impossible, though, if someone feels that it's
sufficiently important to their users.

Michael Kay

> -----Original Message-----
> From: noe_michejda@7thportal.l.pl 
> [mailto:noe_michejda@7thportal.l.pl] 
> Sent: 16 September 2003 23:42
> To: public-qt-comments@w3.org
> Subject: Stylesheet modules and global variables
> 
> 
> 
> 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).
> 
> Maybe solutions from XQuery (modules) could be somehow adopted?
> 
> Or at least some kind of 'standalone' stylesheet module flag and rule 
> disallowing overriding variables/funtions with one with 
> different static type (@as attribute). This will solve many problems.
> 
> 
> Noe Michejda
> 7th Portal SC
> 
> 
> 
Received on Wednesday, 17 September 2003 09:49:11 UTC

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