Re: ODF and annotations

From: Martin Sevior <msevior_at_gmail.com>
Date: Tue Oct 25 2011 - 00:49:42 CEST

HI Ben,

This is a perfectly valid solution. Please go ahead and commit the
changes to implement this.

With this in place I feel comfortable providing users an option to
make ODT the default file format.

Of course we will have to work very hard to fix any resulting dataloss
bugs that result from this change.

Cheers

Martin

On Tue, Oct 25, 2011 at 8:49 AM, Ben Martin
<monkeyiq@users.sourceforge.net> wrote:
> Hello,
>   Martin Sevior pointed out to me that currently the range of an
> annotation is not preserved by abiword when saved & loaded again through
> ODF. I started digging into this and the ODF IO paths write
> office:annotation elements but do not use office:annotation-end to mark
> the end of the range.
>
>   The ODF spec lists annotation-end in 13.2 as being an XML element
> which can be optionally used to define the end of a text range for the
> annotation. Having experimented in LO (libreoffice-core 3.3.3.1-7) from
> Fedora 15, an ODF file using annotation-end loads OK but doesn't show
> the scope. On save the scope is dropped by LO back to a single point
> annotation. This leads me to believe that LO is simply ignoring the
> annotation-end marker as it uses margin notes to show annotations.
>
>  I propose to add support for writing and reading annotation-end to
> abiword ODF code in trunk. I already have some code to read such files.
> As the use of annotation-end still relies on the same annotation XML
> element to mark the start of range, ODF files produced this way should
> still read in the same way in other applications which do not support
> annotation ranges (such as LO).
>
>  For demonstration purposes, if one has an abw chunk like the below,
> sans my newlines and whitespace for readability:
>
> <p style="Normal" xid="2">
>  This is the
>    <ann annotation="x" xid="3">
>      <annotate annotation-id="0"
>   props="annotation-author:was me; annotation-date:10-20-2011">
>        <p style="Normal" xid="4"> base text  xxx</p>
>      </annotate>
> base text of
>    </ann>
> the document</p>
>
> Then the equivalent ODT might be something like the below. If an
> application ignores annotation-end then they get an annotation
> associated with a single point in the document instead of a range.
>
> <text:p text:style-name="Normal" >
>  This is the
>  <office:annotation office:name="foo">
>    <dc:creator>was me</dc:creator>
>    <dc:date>10-20-2011</dc:date>
>  <text:p text:style-name="Normal" >base text <text:s/>xxx
>  </text:p>
>  </office:annotation>
> base text of
>  <office:annotation-end office:name="foo"/>
> the document</text:p>
>
>
Received on Tue Oct 25 00:50:00 2011

This archive was generated by hypermail 2.1.8 : Tue Oct 25 2011 - 00:50:00 CEST