OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] XML Query 1, XSLT 2, XPath 2, and supporting specs W3C Recommendations

> 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

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

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS