[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?


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


> Is it a mistake for XPath to try to incorporate so much of XQuery, or is 
> this what users really want?

Jeni's answered many of the technical issues, but just to pick up on
this question which goes I think to the heart of the problem.
The way the question is phrased highlights the warped view of history
that has caused Xpath2 to be so alien. Xpath is an existing language,
and Xquery is just a draft spec, so the question shouldn't be about
Xpath incorporating Xquery, but rather 

Why has Xquery failed to pick up on so many of the lessons learned from
over two years of Xpath use?


Look at the only comparable thing to supporting schema types in Xpath1
DTD ID support and the id() function. Have users been crying out for
more of this? No! The usual advice is to use xsl defined keys instead.

Jeni said:

  - dereferences -- id(), which does basically the same thing, is
    very rarely used because people tend to want to make their
    stylesheets robust in case DTDs aren't available for some reason,
    so use key() instead. I don't see that dereferencing will be any
    different, although if it used XML Schema identity constraints it
    would be a lot more compelling


Using XSL keys allows you to tune your index to the needs of the
stylesheet rather than whatever features the author of the dtd/schema
for that document type thought might be useful things to index on. They
also protect the stylesheet from optional behaviour by XML parsers which
might or might not report the ID information.

So what does Xpath 2 do?

Firstly it provides the bizarre => operator which is a restricted
version of id(), then for all the new types it stresses the id()
approach of inferring type information which might possibly be supplied
by a suitable parser, rather than the approach that has proved far more
robust, allowing the stylesheet to specify what types it wants to use
for the content of certain elements.

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.

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.