- From: Michael Rys <mrys@microsoft.com>
- Date: Thu, 16 Oct 2003 19:15:48 -0700
- To: "Bill Keese" <billk@tech.beacon-it.co.jp>, <public-qt-comments@w3.org>
Just a nitpick: SQL WHERE clauses fail with a conversion error if a conversion fails and the query processor executes a plan that leads to the execution of the offending conversion. Actually, the current XQuery rules are pretty close to SQL's rules in that respect. > -----Original Message----- > From: public-qt-comments-request@w3.org [mailto:public-qt-comments- > request@w3.org] On Behalf Of Bill Keese > Sent: Thursday, October 16, 2003 7:11 PM > To: public-qt-comments@w3.org > Subject: Re: XQuery > > > Guido, you suggested that null values be introduced into XQuery, and met > with a lot of opposition. But, from your examples, it seems like what > you really wanted was something like "use null semantics when evaluating > where conditions". You don't actually want an XQuery expression to > return null values, do you? What if where clauses operated like SQL > where clauses, returning false when there was a type conversion > exception? I guess this is pretty much what Michael Kay suggested. (Of > course, the counter-argument is that type-exception messages help > programmers catch errors in their code and their data. I understand > both views.) > > > for $p in document("p.xml")//person > > where is_null((number) $p/@age) /* not exactly XQuery syntax, sorry > */ > > return $p/@name > > You can write this query using the "instance of" operator, right? > (http://www.w3.org/TR/xquery/#id-instance-of) > > for $p in document("p.xml")//person > where not($p/@age instance of xs:number) /* I think this is xquery syntax > */ > return $p/@name > > > > Indeterminism sucks! > By the way, I don't think anyone was really debating your argument that > non-deterministic languages have serious disadvantages. Basically, if I > was to paraphrase all the responses, I would say that "non-deterministic > languages have many problems, but we can't make XQuery deterministic > because the performance would be unacceptably bad". > > Bill Keese > > PS: it took me a while to figure out that existentialism has nothing to > do with Kafka. (Especially since every Kafka book's main character is > named "K", which is pronounced the same as "Kay"...) >
Received on Thursday, 16 October 2003 22:15:51 UTC