Hi,
I've been looking at the experimental XEP SXE: Shared XML Editing,
found in the extensions inbox here:
http://xmpp.org/extensions/inbox/sxe.html .
As I understand it has one (or more?) experimental implementation
(Psi, ...). However I have come across a couple of obstacles that I
wonder if anyone has a solution to.
The first, SXE does not specify a way to create or edit XML elements
with a namespace prefix, such as <foo:bar ... />.
Secondly, an issue that has to do with Commutative and Non-commutative
edits. Commutative edits are <new .../> and <remove .../> and
Non-commutative (undoable, edits with a version) <set .../>. However
there are cases when a collaboration will fail. Running the following
edits the result that should happen is unclear.
<new type='element' name='root' rid='GUID0'/>
<new type='element' name='foo' rid='GUID1' parent='GUID0'/>
<new type='element' name='bar' rid='GUID2' parent='GUID0'/>
<new type='element' name='confused' rid='GUID3' parent='GUID1'/>
This will trivially create the DOM:
<root>
<foo>
<confused/>
</foo>
<bar/>
</root>
Lets now move <confused/> to the <bar/>.
<set target='GUID3' parent='GUID2' version='1'/>
This edit is undoable, meaning if another set with target GUID3 and
version 1 is to be processed, the state of the <confused/> document
should revert back to version 0 which is as the original DOM is.
However, consider the undoable edit <remove/> and a following <set/>
with target GUID3 and version 1 that does a trivial change, like
changing the name of the element.
<remove target='GUID1'/> <-- remove the now empty <foo/> from existence.
<set target='GUID3' name='confusing' version='1'/>
As GUID3's state already has version 1 the procedure is to revert back
to the previous version, thus the parent should revert back to <foo/>,
which is not possible anymore since it has been removed.
Any comments on this anyone?
Jonas