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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XQuery types was Re: [xml-dev] Yet another plea for XUpdat

[ Lists Home | Date Index | Thread Index ]

Before this turns into a pointless critique of the
XQuery formal semantics I'll just steer this
conversation back to the original point. 

Some members of the XQuery WG feel that a complex type
system such as XQuery's is necessary for updates while
I am of the opinion that a post-validation requirement
is the minimum that should be required. 

The bottom line is that any XML database product that
supports XQuery and W3C XML schema plus an update
capability will have to support post-update validation
because the XQuery and W3C XML Schema "type" systems
leave the door open for too many things to be dynamic.

By the way here are some quotes from the Formal
Semantics document which point out what I mean by
validation vs. type system 

"The XQuery type system is based on XML Schema. XML
Schema defines a notion of validation for XML
documents. When doing validation, an XML Schema
processor checks if the structure, and the text
content of a document verifies the constraints on the
structure, and the constraints on values, specified in
the schema. As an example of constraints on the
document structure, all book elements might be
declared to contain an isbn attribute, and a title
element, followed by a sequence of one or more author
elements. As an example of constraints on values, the
isbn attribute might be declared as a subset of the
XML Schema xsd:string values, using a XML Schema
pattern facet."

Especially with regards to restriction facets, there
simply is no way for this to be implemented without
something akin to post-update validation. Identity
constraints as well. In fact, when I think about even
making sure that the results of an update do not
result in an invalid content model for an element in
the document is pretty much another validation issue
not a type one. 

--- Jonathan Borden <jborden@attbi.com> wrote:
> Dare Obasanjo wrote:
> >
> > Amusingly enough, my day job requires me to be
> familiar with both
> aforementioned documents.  So what exactly was your
> point again?
> I think XQuery semantics is terrific, albeit a bit
> technical. I consider it
> to define a perfectly reasonable and adequate for
> the intended purpuse, type
> system, which as is happens is very similar to the
> RELAXNG regular
> expression syntax, i.e. XQuery types are RELAXNG
> regular expressions, and
> both use XML Schema for simple (non-XML) datatypes.
> Typing and validation are closely related. Consider
> a type as an (usually
> unbounded) set whose members are those pieces of XML
> that are 'valid' with
> respect to the type specification.
> That's exactly my point.
> Jonathan
> >
> > Dare Obasanjo wrote:
> >
> > > Secondly, XQuery doesn't really have a type
> system
> > > because it uses W3C XML Schema which is a
> validation
> > > system.
> >
> > Gasp. As punishment for saying such things you
> should be forced to read
> > http://www.w3.org/TR/query-semantics/
> >
> > Jonathan
> >
> The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at
> http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the
> subscription
> manager: <http://lists.xml.org/ob/adm.pl>

My dungeon cell decor will not feature exposed pipes. 
While they add to the gloomy atmosphere, they are good conductors of vibrations and a lot of prisoners know Morse code.

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness


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

Copyright 2001 XML.org. This site is hosted by OASIS