Lists Home |
Date Index |
----- Original Message -----
From: "Jonathan Robie" <email@example.com>
Sent: Thursday, January 03, 2002 8:45 AM
Subject: [xml-dev] XQuery Update Proposal
> Several people asked for me to post the update proposal I presented at XML
> 2001. Patrick Lehti has now posted his thesis, which contains this
> proposal, to the web:
> I expect this proposal to change somewhat.
Here're some of my thoughts based on the parts of the paper I read, pages 23
thru 31 on .update extensions to XQuery.
I mostly agree with the choices of "musts", "shoulds" and "mays" but would
promote namespace awareness to a "must" instead of a "should" specifically
with regards to inserting attributes. I'd hate for the ability to insert
attributes from different namespaces to vary between different compliant
XQuery implementations. Speaking of which there doesn't seem to be a way to
construct an attribute with a given namespace prefix and namespace URI in the
current version of the XQuery spec 
I prefer the clauses "INSERT BEFORE" and "INSERT AFTER" to "INSERT PRECEDING"
and "INSERT FOLLOWING" because the former are clearer for most to understand
and are already used by XUpdate .
Is there any reason the conditional update expression written as
IF (count(//employee)>1000) THEN
IF (count(//employee[sex=male]>100)) THEN
couldn't have been written as
IF ((count(//employee)>1000) AND (count(//employee[sex=male]>100))) THEN
Anyway I think prefer the above construct to MSFT's UPSERT clause .
FLW-Updates look very useful.
THINGS TO DO IF I BECOME AN EVIL OVERLORD #71
If I decide to test a lieutenant's loyalty and see if he/she should be made
a trusted lieutenant, I will have a crack squad of marksmen standing by
in case the answer is no.
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com