Lists Home |
Date Index |
> > The strong static typing may tell me, for instance, that a
> > query is invalid
> > because you can't multiply an integer times a URL
> And what's more, it doesn't only tell you that the query is invalid: it can
> give you information that enables the query to be optimized. To take an
> example, consider the filter expression $a[expr]. This expression is
> polymorphic - it has a different meaning depending on whether expr has a
> boolean value or a numeric value, and the optimization opportunities are
> very different for the two cases. If you know statically which case applies,
> you can do much more effective optimization.
> In fact, XPath 1.0 processors are likely to do this kind of static analysis,
> even though the XPath 1.0 specification has no type system or formal
> semantics worthy of the name. What the XQuery (=XPath 2.0) specification
> does is to make this all explicit.
You yourself make the salient point. There is *nothing* wrong with an implementation finding whatever optimizations it can, even static models. This is an implementation issue, and I think not relevant.
The problem is this business of "making it all explicit" which then constrains the conceptual model of technologies such as XPath in what I consider to be a very inappropriate way.
I did disavow direct abuse of the XQuery formal model in this thread. I have no such reservations about XPath 2.0. It is a bloated mess, mostly because of the typing baggage, and I predict that XPath 1.0 and XSLT 1.0 will long survive the arrival of their 2.0 descendants.
I, for one, as an avid XPath 1.0 and XSLT 1.0 implementor, am not likely to want to have anything to do with a good portion of what's in the 2.0 specs. It's too bad that there is a lot of good stuff buried in the wreck.
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