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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--