Re: New strux and field elements for Annotations.

From: Leonard Rosenthol <leonardr_at_lazerware.com>
Date: Tue Jul 24 2007 - 23:52:40 CEST

One thing you will need to deal with is overlapping annotations.
Consider the following psuedo-XML

<ann note="foo">this <ann note="bar"> is a</ann note="
foo"> test</ann note="bar">

See the problem - XML won't allow mismatched open/close pairs NOR does
it allow attributes on close tags in order to enable smarter matching.

So how do you write out this sort of thing? One obvious way is to
break the text run up...

Leonard

On 7/23/07, msevior@physics.unimelb.edu.au
<msevior@physics.unimelb.edu.au> wrote:
>
> Hi everyone,
> Over the last two days I have committed code to the riverae
> branch of abiword for annotations.
>
> We need a new type of field and a new type of strux for annotations.
>
> The new field is PTO_Annotation in the piece table. In the formatter it is
> a subclass of the fp_HyperlinkRun. The idea is to reuse the code we have
> for hyperlinks to markup a region of annotated text.
>
> It will share a lot of the code with hyperlinks but the decoration will
> look different. We haven't decided yet what this will be but I'm thinking
> turning text green and placing a broken greenline line underneath.
>
> The name of this field when written to *.abw is "ann"
>
> I've also defined a new pair of struxes for Annotations. These these are:
> PTX_SectionAnnotation and PTX_EndAnnotation.
>
> They are very similar to footnotes in that the content of the annotation
> is buried inside paragraphs, just link footnotes and endnotes.
>
> The new element written to the *.abw file format is "annotate".
>
> So a typical annotation written to *.abw will look like:
>
> <ann Annotation:123><annotate Annotation:123><b style:normal>Some text</b>
> </annotate></ann>
>
> At this point all this code is in riverae branch. When we're happy we
> haven't caused regregressions, we'd like to merge it into trunk with UI
> hidden behind DEBUG directives.
>
> Cheers
>
> Martin
>
>
>
>
Received on Tue Jul 24 23:50:58 2007

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2007 - 23:50:58 CEST