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] Serialization and change tracking


Interesting that you came to this representation via another route, good to hear that it does make sense to you. I think we are possibly being distracted by trying to go from any arbitrary document to another (which GCT can do) but there are sometimes simpler ways to achieve the same thing. Maybe similar techniques can be applied to other areas.

See comment below about the detail of your representation.

On 26/06/2011 11:38, monkeyiq wrote:
On Fri, 2011-06-24 at 11:02 +0100, Robin LaFontaine wrote:
..snip

FWIW this is fairly much the serialization I arrived at for abiword. Though I arrived at this serialization with the help of Frank Meies when trying to code example 6.4.2 from the GCT [2].

A slightly cleaned up version of the ODT that abiword [1] currently produces for the changes is below. The edits to produce this were as follows. Note that I have changed the style-name strings in order to give their meanings implicitly.

Edits:

id=1, Remove Bold
id=2, Remove Bold
id=3, Remove Bold


ODT Fragment:

<text:p text:style-name="Normal" delta:insertion-type="insert-with-content" delta:insertion-change-idref="1" >
    <text:span text:style-name="bold" delta:insertion-change-idref="1">Remove </text:span>
    <text:span text:style-name="norm" delta:insertion-change-idref="2" 
               ac:change3="1,insert,text:style-name," 
               ac:change4="2,modify,text:style-name,bold">B</text:span>
    <text:span text:style-name="normUL" delta:insertion-change-idref="3" 
               ac:change4="1,insert,text:style-name," 
               ac:change5="2,modify,text:style-name,bold" 
               ac:change6="3,modify,text:style-name,norm">ol</text:span>
    <text:span text:style-name="norm" delta:insertion-change-idref="2" 
               ac:change3="1,insert,text:style-name," 
               ac:change4="2,modify,text:style-name,bold">d</text:span>
</text:p>

change-id=3 is simple to undo here. To undo a change that is midway through an ac:change set is a little more complex as you have to shuffle its attribute value down in the ac:change list.

..snip

Looking at your cleaned up version, I think the representation should be a bit simpler than what you propose - currently you have the attribute
delta:insertion-change-idref="n"
on the text:p and also on the text:span(s) within it where it is not needed - I think your intention was that the document after change 1 but before change 2 is like this (assuming change 1 is to add the whole paragraph as suggested by the insert-with-content attribute, rather than to make 'Remove bold' all bold):

<text:p text:style-name="Normal" delta:insertion-type="insert-with-content" delta:insertion-change-idref="1" >
    <text:span text:style-name="bold">Remove </text:span>
    <text:span text:style-name="bold">B</text:span>
    <text:span text:style-name="bold">ol</text:span>
    <text:span text:style-name="bold">d</text:span>
</text:p>

In other words, all the spans are there as part of the original content because the application knows, before it serializes the data, all the change tracking it needs to record and so it can decided how to split up the text to support this. Then you get a simpler result, moving to change 2 we have:

<text:p text:style-name="Normal" delta:insertion-type="insert-with-content" delta:insertion-change-idref="1" >
    <text:span text:style-name="bold">Remove </text:span>
    <text:span text:style-name="norm"
               ac:change4="2,modify,text:style-name,bold">B</text:span>
    <text:span text:style-name="norm" 
               ac:change5="2,modify,text:style-name,bold">ol</text:span>
    <text:span text:style-name="norm"
               ac:change4="2,modify,text:style-name,bold">d</text:span>
</text:p>

and moving to change 3:

<text:p text:style-name="Normal" delta:insertion-type="insert-with-content" delta:insertion-change-idref="1" >
    <text:span text:style-name="bold">Remove </text:span>
    <text:span text:style-name="norm"
               ac:change4="2,modify,text:style-name,bold">B</text:span>
    <text:span text:style-name="normUL" 
               ac:change5="2,modify,text:style-name,bold"
               ac:change6="3,modify,text:style-name,norm">ol</text:span>
    <text:span text:style-name="norm"
               ac:change4="2,modify,text:style-name,bold">d</text:span>
</text:p>

Robin

-- 
-- -----------------------------------------------------------------
Robin La Fontaine, Director, DeltaXML Ltd  "Change control for XML"
T: +44 1684 592 144  E: robin.lafontaine@deltaxml.com      
http://www.deltaxml.com      
Registered in England 02528681 Reg. Office: Monsell House, WR8 0QN, UK


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