|
[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
> 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! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
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! Subscribe in XML format
|
|||||||||







