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 XUpd

[ Lists Home | Date Index | Thread Index ]

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

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com   

<<attachment: winmail.dat>>





 

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

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