[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Function arguments (was regexps once)

Subject: Re: Function arguments (was regexps once)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sun, 13 Jan 2002 00:13:36 +0000
additional arguments in r
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.