W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2002

Re: [xml-dev] XPath 2.0 - how much of XQuery should it include?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 14 May 2002 17:26:28 +0100
Message-ID: <841928111487.20020514172628@jenitennison.com>
To: "Kay, Michael" <Michael.Kay@softwareag.com>
CC: public-qt-comments@w3.org
Hi Mike,

> The <xsl:item> idea is not unattractive, and we haven't ruled it
> out. But I think if we go this way it will tend to increase the
> amount of duplication between the two languages rather than decrease
> it. If we had full composability between XSLT and XPath expressions
> then we could put the functionality where we liked. We haven't; and
> functionality that we put into XPath is available in a wider variety
> of contexts than the same functionality in XSLT. (Including to XPath
> hosts other than XSLT of course). We all know the limitations of
> keys and sort keys having to be defined as a single XPath
> expression. I don't think we can remove sequence construction and
> mapping from XPath, so I would rather not duplicate them in XSLT.

Of course there's not full composability, but then neither design
gives you that (or at least not as I understand it). In the current
design, there are the duplications:

   - xsl:choose   vs. if
   - xsl:for-each vs. for
   - xsl:variable vs. range variables
   - xsl:sort     vs. sort()

xsl:item would eliminate the requirement for the last two of these
duplications. I'm not sure what duplications it would add in their

On the xsl:sort and xsl:key front, I'm fairly sure that the majority
of struggles that people experience with defining keys/sort values
will be addressed by general steps and by simple versions of the
conditional and mapping expressions. There is always the ability to
use a function for those rare occasions where it's not.

> I also want to keep the idea that an XSLT stylesheet is a template
> for the result document. Literal result elements and text nodes in
> the stylesheet are copied directly to the result; instructions
> generate groups of nodes in the result. I thinnk that's a useful
> metaphor.

I agree that's a useful metaphor, but I think that XSLT has gone
beyond it, especially by abolishing result tree fragments. I think
people now quite often create things in the stylesheet that they have
no intention of copying through to the result.



Jeni Tennison
Received on Tuesday, 14 May 2002 12:40:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:09 UTC