[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Function arguments (was regexps once)
Mike wrote: >> I agree that you can think of the pertinent aspects of the focus as >> being an additional argument to the function. I just wanted to >> bring out the point because the only exising built-in function that >> returns a node tree - document() - returns the same tree *across >> the stylesheet* rather than *in a particular context*. > > Actually the result of document() is context dependent, and in a > rather unusual way: it is the only construct whose result depends on > the base URI of the stylesheet element containing the expression. > This base URI is used to expand any relative URI in the call. Ahh, good point. There are also functions that rely on what's been defined in the stylesheet: - key() uses xsl:key - format-number() uses xsl:decimal-format - sort() uses xsl:sort-key (introduced in XSLT 2.0) You could easily imagine user and vendor-defined extension functions that similarly relied on data elements in the stylesheet. Fortunately, given a particular stylesheet in a particular location, none of this impacts on what the functions will return for a particular set of arguments. So you can guarantee that it doesn't change during the lifetime of the transformation (well, assuming that no vendor-defined extension functions mess around with the stylesheet itself during processing, that is!). 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
|