[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XQuery types was Re: Yet another plea for XUpdat
What you just stated doesn't jibe with any formal knowledge I have about types and language systems but since my background in formal computer science theory is weak I won't attempt to correct your claims. So I'll try to explain my point in lay terms. The main benefit of a type system is so that things can be done *statically* at compile time instead dynamically at run time. Validation is a dynamic process. Thus a "type system" based on validation isn't really type system especially to people with a programming or database background. Bottom Line: The XQuery type system although onerous and complex does not forestall the need for post-update validation if/when XQuery becomes a DML and not just a query language. Therefore claims that a "type system" is necessary before update semantics can be added to XQuery are ill-considered. --- Jonathan Borden <jborden@a...> wrote: > Dare Obasanjo wrote: > > > Before this turns into a pointless critique of the > > XQuery formal semantics I'll just steer this > > conversation back to the original point. > > Let's make this simple. > > There are instances and classes which are sets of > instances. That's all. > Pieces of XML are instances, types are classes. > > One can classify an instance using a "classifier". > The process of "schema > validation" is simply the process of classifying an > instance as or not as, a > member of a class (type). > > So a type is a class, and validation is a process of > classification. > > In any case, you can't have "validation" without > some sort of "type" to > validate against *** > > Jonathan > > *** note that we use the term "type" as a synonym > for "class" and not as in > Russell ... A great undergraduate level introduction > to logic, which > discusses instances and classes is Tarski > http://www.oup-usa.org/isbn/019504472X.html . It is > very simple yet powerful > stuff. > > > > > > 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. > > > > > > > ===== THINGS TO DO IF I BECOME AN EVIL OVERLORD #145 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 http://health.yahoo.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! 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
|