> But i agree there are cases where it makes sense. Sometimes i write,
> <xsl:variable name="input" select="/" />
> for example,
Yep, we all do that, and it's very handy, but it also has a devastating
impact: it severely restricts your abiliity to reuse your code. If you've got
a stylesheet that processes a single document, and you want to change it to
process a collection of documents, that global variable will no longer be
available. I've fallen into that trap so many times...
Michael Kay
Saxonica
|