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

Re: Recursive replacement

From: Martin Probst <martin@x-hive.com>
Date: Mon, 30 Jan 2006 17:28:31 +0100
To: David Carlisle <davidc@nag.co.uk>
Cc: novak@ispras.ru, www-ql@w3.org
Message-Id: <1138638511.7862.30.camel@localhost.localdomain>

On Mon, 2006-01-30 at 15:42 +0000, David Carlisle wrote:
> Martin
>   Well, the constructor "element new-node {$p/*}" copies the contents of
>   the node $p, so the outermost <a/> node is replaced with
>   <new-node><b><a/></b></new-node>.
> Yes but the question is really about the inermost a node.
> Michael indicated that the table is intended to allow the operations
> that commute, so it depends a bit on what the definition of equivalence
> is.
> If you replace the inner one first, then the outer one, then the effect
> is as if you just replaced the outer one, as you indicate above.
> If however you replace the outer one first, when you come to replace the
> inner one, it's not there, so is that a merge conflict and an error, or
> do you just silently do nothing in which case commutativity is
> restored, and you get the same result as if you had done the operations
> in the other order.

No. Imagine what operations you get:
a) replace inner-a with <new-node/>
b) replace outer-a with <new-node><b><a/></b></new-node>
The important thing: this ------------^ <a/> is a completely different
node than the original inner-a, so the order doesn't make any

Received on Monday, 30 January 2006 16:28:44 UTC

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