Torben,

Are you familiar with the approach by Sun et al for generalizing OT to
SGML[1]?
In your example, let's call the grove <doc> 0, the first line element 0 and
the second 1. Assuming two concurrent operations "delete [0, 0]" (deletes
<line>Foo</line>) and "change [0, 1] add 'foo' in position 2" (makes it
<line>Barfoo<line>), we can delete the first <line />, and transform the
change operation to "change [0, 0] add 'foo' in position 3".

This approach deals with the tree as a real XML tree.

[1] http://portal.acm.org/citation.cfm?id=587088

On Tue, May 18, 2010 at 5:43 PM, Torben Weis <[email protected]> wrote:

> Hi Jim,
>
> wave operates on a tree data structure. You can either insert or remove an
> entire subtree.
> If you have the following markup
>
> <doc><line>Foo</line><line>Bar</line></doc>
>
> and you want to join the two lines, then you must remove both lines (each
> is a sub-tree of <doc>) and insert a new one. This conflicts with others
> editing one of these lines concurrently.
>
> Thus, you must plan your data structure in a way which allows the common
> operations to be represented by inserting or removing complete sub-trees.
>
> Using
>
> <doc><line></line>Foo<line></line>Bar</doc>
>
> does exactly this, because <line></line> is a sub-tree which can now easily
> be removed. Et voila, the two lines are joined.
>
> Hope this helps
> Torben
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Wave Protocol" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<wave-protocol%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/wave-protocol?hl=en.
>



-- 
Guillermo Rauch
http://devthought.com

-- 
You received this message because you are subscribed to the Google Groups "Wave 
Protocol" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wave-protocol?hl=en.

Reply via email to