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

RE: XML Query 1, XSLT 2, XPath 2, and supporting specs W3C Rec

  • From: "Michael Kay" <mike@s...>
  • To: "'Rick Jelliffe'" <rjelliffe@a...>,"'Liam Quin'" <liam@w...>
  • Date: Thu, 25 Jan 2007 10:38:04 -0000

RE:  XML Query 1
> The extra 
> libraries and expressiveness of
> XPath2 fits well with user requirements, not so much the datatyping.

Yes, I've been wondering about that.

Generally, the existing constraints that you can express in XML Schema, such
as enumerations, are type-sensitive: if an enumeration for xs:decimal allows
20, then it also allows 20.0. 

On the whole my feeling is that if you add more expressive constraints to
XML Schema, they should work on typed values rather than string values. For
example if you say @price > @discount, then it should do a numeric
comparison if the attributes are both numeric, while if you say
@date-of-birth < current-date(), it should do a date comparison. 

But I've been wondering about not only using XPath for defining constraints,
but also using XPath for type determination: perhaps an implicit xsi:type
attribute computed as the result of an XPath expression. This provides a
rather powerful constraint mechanism. In this case the XPath expression has
to be evaluated before validation, so it would seem it has to work on the
untyped data. Fortunately XPath 2.0 is defined to work both on typed and
untyped data.

Michael Kay
http://www.saxonica.com/ 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.