|
[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
> ------=_NextPart_000_001B_01C1F5AC.CCBEA230 > Content-Type: text/plain; > charset="US-ASCII" > Content-Transfer-Encoding: 7bit > > > > > At the beginning of this thread Dare asserted that a weakness of > > > > XML-Query is that it's semantics is too weak to allow > > > static analysis > > > > of the correctness of updates. > > > > > > > > What's interesting is that this assertion is in fact untrue, but > > > > people seem to be accepting it and instead arguing > > whether that's a > > > > fatal flaw or not (and what the relevant definition of "type" is). > > > > Please prove this assertion untrue. XML type systems (especially with > > W3C XML Schema) are based on constraints. Constraints are runtime > > issues.... > > There's a misunderstanding here. No static analysis of any program can > classify programs unambiguously as correct or incorrect; if that were the > case it would never be necessary to execute a program. The purpose of static > checking is to reject as many incorrect programs as possible before > executing them. An interesting design choice is the extent to which we > reject the programs that might or might not be correct, depending on the > input data. Typically we solve this by distinguishing structural > constraints, which can be checked statically, from value-based constraints, > which can't: but it's a fuzzy boundary. > > Static analysis potentially allows one to catch mistakes like the following > common one: > > <xsl:for-each select="item"> > <xsl:value-of select="item"> > > and this is surely a Good Thing. Dynamic analysis could allow precisely the same thing, if one had access to the content model, which could be a DTD or RELAX NG as well as XSDL. This has been the crux of my point. Rather than giving the XML "programmer" *generic* facilities for things such as correctness through constraint checking and even functional dispatch based based on type analysis, XPath 2.0/XSLT 2.0 gives us a highly limited yet complex system wedded to a single, flawed schema definition language. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html RDF Query using Versa - http://www-106.ibm.com/developerworks/xml/library/x-think10/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel
|
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
|
|||||||||

Cart








