[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Function arguments (was regexps once)
Hi Tom, > This suggests either a different keyword for functions that may > depend on the current context vs those that may not, or never > allowing functions to implicitly depend on the current context (and > thus function that wanted to do so would have to be written like > Jeni's second example, with > > <xsl:call-id select="my:resolve-uri($url, $node)" /> > > ). > > For example, you could have xsl:function and > xsl:function-context-rel. Still, there could be trouble if a > function that was expected to be context-independent were to invoke > a context-dependent function as part of its definition. That would > have to be disallowed. I think that rather than disallowing calls to particular functions, you could make there be a difference between how the focus is set up for xsl:function-context-rel (where it's the same as the focus at the point when the function is called) and xsl:function (where it's something else, possibly the document node of the principal source document, as I discussed in an earlier mail to Joerg). An alternative to two elements, would be a "uses-context-from-call" flag on the xsl:function that is explicitly set to "false" if the function doesn't use anything about the context of the call. Assuming, of course, that some functions should be written with implicit information about the focus, which could be argued both ways. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|