This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Function arguments (was regexps once)
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Sun, 13 Jan 2002 00:13:36 +0000
- Subject: Re: [xsl] Function arguments (was regexps once)
- Organization: Jeni Tennison Consulting Ltd
- References: <001401c19bc3$c0c02370$465169d5@pcukmka>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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