[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office-collab] Serialization and change tracking
On Fri, 2011-06-24 at 11:02 +0100, Robin LaFontaine wrote:John: 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. To illustrate, assume the following change-id=N, edited text sequence: id=1, foo id=2, foo id=3, foo id=6, foo This should give a text:span with these GCT attributes: text:style-name="underlined" ac:change4="1,insert,text:style-name," ac:change5="2,modify,text:style-name,bold" ac:change6="3,modify,text:style-name,norm" ac:change7="6,modify,text:style-name,ital" To revert id=3 the edit sequence then changes to the following: id=1, foo id=2, foo The ODT attributes will have the ac:change6 removed, but its attribute value will have to replace that of the subsequent ac:change, giving the edits: text:style-name="underlined" ac:change4="1,insert,text:style-name," ac:change5="2,modify,text:style-name,bold"The of course avoids the sticky situation where one might want to apply change tracking to the reversion of a change. [1] https://github.com/monkeyiq/odf-2011-track-changes-git-svn [2] http://lists.oasis-open.org/archives/office-collab/201104/msg00046.html
..snip-- -- ----------------------------------------------------------------- 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--------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]