xsl-list
[Top] [All Lists]

Re: [xsl] user-defined XSLT functions and stylesheet variables?

2021-06-20 03:01:06

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
--~--


<Prev in Thread] Current Thread [Next in Thread>