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

Re: XPath 1.5? (was RE: typing and markup)


aaa typing
Rick Jelliffe wrote:

From: "Jonathan Robie" <jonathan.robie@d...>

> >The idea that a query system can optimise away, or generate errors on,
> >queries like aaa/bbb if the schema specifies that aaa has no bbb children
> >is also very worrying.
>
> Indeed.
>
> Whether or not that is an error is currently an open issue in XQuery. My
> own view is that it should be neither a static nor a dynamic error, but
> that it should evaluate to an empty sequence.

[[
Is that right? There is no way to say "Tell me what is in the document"
if some schema has deemed something impossible.  How the hell can
anyone validate documents-in-progress (which may well be invalid)
using that?
]]

This isn't as bad as you think. One very reasonable interpretation of:

aaa/bbb

when the schema says this is 'disallowed', indeed that the node list
returned by such an XPath will always be null -- without needing to look at
any particular instance of a document meeting the constraints expressed in
the schema.

So a clever XPath 2 implementation could, I suppose "compile" the "aaa/bbb"
path into a null list (ala constant evaluation).

A Schematron assertion (that the node list is non-null) would then always
fail, even at "compile" time.

I think this behavior would be _better_ for Schematron. This behavior is
expected when you treat a "type" as defining a set of nodes, and why I've
said that XPath 1.0 -today- is viewed as such a type system.

Jonathan


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.