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

RE: XPath 2.0 - how much of XQuery should it include?


xquery construct nodes
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@n...
work: Michael.Kay@s... 

> -----Original Message-----
> From: David Carlisle [mailto:davidc@n...] 
> Sent: 10 May 2002 16:16
> To: michael.h.kay@n...
> Cc: xml-dev@l...
> Subject: Re:  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 
<http://www.oasis-open.org>

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>


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.