W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2006

Re: Recursive replacement

From: David Carlisle <davidc@nag.co.uk>
Date: Mon, 30 Jan 2006 15:15:58 GMT
Message-Id: <200601301515.PAA22983@penguin.nag.co.uk>
To: novak@ispras.ru
CC: www-ql@w3.org

> 1)replace {fn:doc("test.xml")//a} with <new-node/>

This is in error as //a selects 2 nodes, and 

   The target expression is evaluated. The result must be a single node
   whose parent property is not empty;  otherwise a dynamic error is raised 

> 2) for $p in fn:doc("test.xml")//a 
>    do replace {$p}
>       with element "new-node" {$p/*}

Hmm I'll leave that one for a WG member to answer.., I think that you
should get get an error from

  All the pending update lists generated by the previous step are merged
  by successive invocations of the upd:mergeUpdates operation. If the
  upd:mergeUpdates operation signals an incompatibility, a dynamic error
  is raised [err:TBD].  

But I don't actually see that in the table in
which has side condition "Not compatible if t1 is t2." in some cases
looks to me as if it should be t1 is an ancestor to t2


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
Received on Monday, 30 January 2006 15:26:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:44 UTC