OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office-collab message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office-collab] Immutable document for WebODF?

On Wednesday 13 January 2016 22:51:47 Patrick Durusau wrote:
> I was replaying the comments about WebODF and I don't think they are
> using an immutable document target.
> I say that because the point of the operations is to re-calculate the
> off-sets of each change against others and then make some sensible
> ordering of them.
> If they truly had an immutable target, no operation would change the
> offset of another operation, unless and until you decided to generate
> a new document instance. Yes?

That is true. The current mode of WebODF is to create operations on the latest 
state of the document. It could have a mode where the operations work on the 
initial document. Operations usually are very small. Just typing 'h' is an 
operation. So the operation 'e' that follows it makes most sense as an 
operation that follows the 'h' operation. If both operations work on the 
initial document, the outcome would be indetermined.

The operations could be merged: 'h' + 'e' = 'he'.

Operations that are independent could be store relative to the original 
document. The server could even be clever and transform operations that work 
on a later version of the document back to work on the original document.

> At that point you would have to calculate the offsets because you want
> a new ordering of the document.
> Up to that point, changes are just projections into the existing
> document, there are no "offsets" unless and until the changes are
> accepted.
> I am probably missing something but it sounds like WebODF is building
> a temporary "new" document, which does require the offsets for display
> to users.
> That is one strategy but projecting the changes into the text without
> actually changing the original text would avoid the recalculation
> unless and until a user accepts the change.
> Yes?

WebODF needs to have the latest version of the document in the user view 
because the document also includes the cursor positions. But it does keep an 
older version of the document and the stack of operations that have been 
applied to it around.

In WebODF the document state is the DOM in the browser.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]