W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 2002

Re: [xsl] Passing sort criteria as a paramter

From: Jonas Sicking <sicking@bigfoot.com>
Date: Mon, 28 Jan 2002 14:52:27 +0100
Message-ID: <002d01c1a803$063e50c0$b3e0d0d9@telia.com>
To: "Kay, Michael" <Michael.Kay@softwareag.com>, <xsl-editors@w3.org>
Michael Kay wrote:
> > Michael Kay wrote:
> > > for example, how
> > > should namespace prefixes in the dynamic XPath expression
> > be resolved?
> >
> > Actually, this requirement already exists for several
> > xslt-functions. For
> > example the key() function has to resolve the prefix in the
> > keyname, and the
> > element-available function has to resolve the prefix of the
> > element-name.
>
> Yes; these functions require namespace context to be available at
run-time.
>
> But one of the use-cases for evaluate() is handling of XPath expressions
> that are read from the source document; and it's not clear that this
> requirement can be adequately met by using the namespace declarations that
> are in scope in the stylesheet, since these will not generally be known to
> the author of the source document containing the XPath expression.

Why not use a similar solution as the document() function (which i must say
is one of the most ingenious parts of XSLT1.0), where you can use a nodeset
as first argument and thus use the nodes in that nodeset as resolver, or
give a second argument to use as resolve node. Of course evaluate() would
only use the first node in the nodeset in the first argument, but that is
what would happen even if just a string was accepted as first argument.

/ Jonas Sicking
Received on Monday, 28 January 2002 08:47:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:52 GMT