OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



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

[ Lists Home | Date Index | Thread Index ]

As I say, you can draw the line in different places.

Nodes have identity. Atomic values and sequences don't. Creating
something with identity is a side-effect. XPath expressions don't have
side-effects because they don't create things with identity. XSLT
instructions do have side effects, because executing an instruction
twice produces two different nodes. Therefore you can do heavier
optimization at the XPath level than at the XSLT level. There is a logic
to it, however imperfect.

There is another logic as well. Things that are needed both in XQuery
and in XSLT should ideally be done the same way in both. That keeps the
total set of specifications smaller: less to implement, less to test,
less to learn. Many users will be using both languages. The argument
that XPath should be the "greatest common subset" of XQuery and XSLT
isn't an overriding one (for example we have chosen to keep function
definitions separate, despite the argument that users may have to write
the same function twice), but it's a factor to take into account.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 

> -----Original Message-----
> From: David Carlisle [mailto:davidc@nag.co.uk] 
> Sent: 10 May 2002 16:16
> To: michael.h.kay@ntlworld.com
> Cc: xml-dev@lists.xml.org
> Subject: Re: [xml-dev] XPath 2.0 - how much of XQuery should 
> it include?
> Mike,
> I accept that it has to be an arbitrary choice but
>  Drawing the line here
>  puts sequence construction firmly on the XPath side of the 
> boundary,  because a sequence is a value.
> But nodes are also values, so node construction also sits 
> firmly in XPath, but basically that says to junk XSLT and to 
> use Xquery.
> Looking at Xpath2 that is the distinct impression that is 
> given, that XSLT is being marginalised. Maybe that wasn't the 
> intended impression but it is no less real for that.
> Sequences are the Xpath2 replacement for node sets, so if it 
> makes sense for XSLT to construct node sets it should make 
> sense for it to construct sequences.
> David
> _____________________________________________________________________
> This message has been checked for all known viruses by Star 
> Internet delivered through the MessageLabs Virus Scanning 
> Service. For further information visit 
> http://www.star.net.uk/stats.asp or > alternatively call Star 
> Internet for details on the Virus Scanning Service.
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org 
> <http://www.xml.org>, an initiative of OASIS 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS