xsl-list
[Top] [All Lists]

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

2021-06-20 14:18:22
On Sun, Jun 20, 2021 at 04:42:39PM -0000, Michael Kay 
mike(_at_)saxonica(_dot_)com scripsit:
I have occasionally wondered whether the ban on using tunnel parameters 
inside a function is perhaps rather paternalistic. In many ways, accessing 
tunnel parameters is "less evil" than accessing global variables, so if 
functions are allowed to do the latter, they should allowed to do the former. 
Code that binds the current document to a tunnel parameter is more adaptable 
and reusable than code that binds it to a global variable.

I find myself wondering if we should not allow either and do some sort
of per-namespace function context that has to be explicitly defined.

(Which is not to say access to tunnel parameters from functions wouldn't
be welcome in this corner; it would.)

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