XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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

On 1/25/07, Michael Kay <mike@saxonica.com> wrote:

<snip/>

> 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.

Very fortunate indeed, in our case we do our own type management --
I've written previously about our feelings that XML Schema was too
much, too late.

If one did this, a big requirement would be that one can keep the
error messages coherent and inclusive (report all the violations in a
single pass) as much as possible. You really don't want to tell the
user that setting X = 20.7 is a problem because X must be of type
Integer only to turn around and tell them that it must have a value
between 1 and 10 on the next submit.  Currently, keeping type
validation separate from constraint checking allows this (for types
that are compatible) simply because xPath does work on untyped values.
 If you can solve this issue then this could be very useful (though
I'd still rather not use XML Schema), in particular if you could run
the validation on the front end...!

-- 
Peter Hunsberger


[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