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: How it runs today: Generic CT (GCT) proposal text:p/text:h andac:change


So after a bit of hacking away on this, I now have a few examples and
some test suite cases for ac:change. I thought I'd expand one here for
the benefit of the group and possible future implementers.

I have an example with a paragraph which undergoes the following style
changes in sequential revisions. The following defines the sequence, in
that the number in the brackets defines the change-id and the style that
is applied in that change. So in revision 2 I changed the format from
normal to plain text.

(1) normal
(2) plain text
(3) heading 1
(4) normal
(5) heading 1
(6) heading 2
(7) heading 3
(8) plain text 
(9) normal.

Each of the "heading..." styles has an outline-level > 0 and will
produce a text:h XML element in the ODF. The normal and plain text
styles will produce a text:p XML element. Thus some interleaving is
required between those elements.

When this document is written as ODT+GCT (Generic CT) the paragraph
comes out similar to what is defined below. Obviously I've formatted the
XML a little for readability. Hopefully everybody gets a semi-readable
copy. FWIW the read path collects this XML fragment and creates a state
in abiword which has the same revision information as was originally
expressed in the above immediate mode change list (1-9). Round trips are
fun, right?

On the implementation front, depending on how the IO paths are
implemented, one has to maintain change tracking state when a
delta:remove-leaving-content-start/text:[ph] path is seen and merge it
with the next bald text:[ph] XML element. 

There is also the consideration that each time the current state
(text:style-name) has to be merged with the ac:changeX list with a
shuffling to go from tracking changes made to expressing what state to
change things into in a given revision. By this I mean that the ODT+GCT
has the attribute ac:change2="6,modify,style,Heading 1" which has to be
used in conjunction with other information to record that in revision 5
Heading 1 style was applied, in rev 6 heading 2 was applied.

The ODT+GCT:

<delta:remove-leaving-content-start 
 delta:removal-change-idref="2" 
 delta:end-element-idref="ee1">
   <text:p text:style-name="Plain-Text" 
         ac:change1="1,insert,style," 
         ac:change2="2,modify,style,Normal"/>
</delta:remove-leaving-content-start>
<delta:remove-leaving-content-start 
 delta:removal-change-idref="3" 
 delta:end-element-idref="ee2">
    <text:h text:style-name="Heading-1" text:outline-level="1" 
          ac:change1="3,insert,style,"/>
</delta:remove-leaving-content-start>
<delta:remove-leaving-content-start 
 delta:removal-change-idref="4" 
 delta:end-element-idref="ee3">
    <text:p text:style-name="Normal" 
          ac:change1="4,insert,style,"/>
</delta:remove-leaving-content-start>
<delta:remove-leaving-content-start 
 delta:removal-change-idref="7" 
 delta:end-element-idref="ee4">
    <text:h text:style-name="Heading-3" text:outline-level="3" 
          ac:change1="5,insert,style," 
          ac:change2="6,modify,style,Heading 1" 
          ac:change3="7,modify,style,Heading 2"/>
</delta:remove-leaving-content-start>
<text:p text:style-name="Normal" 
      ac:change1="8,insert,style," 
      ac:change2="9,modify,style,Plain Text" 
      delta:insertion-type="insert-with-content" 
      delta:insertion-change-idref="9">
<delta:inserted-text-start delta:inserted-text-id="1"/>
  This is the test paragraph.<delta:inserted-text-end
delta:inserted-text-idref="1"/>
</text:p>
<delta:remove-leaving-content-end delta:end-element-id="ee4"/>
<delta:remove-leaving-content-end delta:end-element-id="ee3"/>
<delta:remove-leaving-content-end delta:end-element-id="ee2"/>
<delta:remove-leaving-content-end delta:end-element-id="ee1"/>




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