Re: New strux and field elements for Annotations.

From: Martin Sevior <msevior_at_physics.unimelb.edu.au>
Date: Fri Aug 10 2007 - 02:27:23 CEST

On Tue, 2007-07-24 at 14:52 -0700, Leonard Rosenthol wrote:
> 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...
>

Hi Leonard,
           Sorry for taking so long to get back to you. Thanks for the
heads up. I hadn't thought of over overlapping annotations. Doing them
correctly will be some work. For the time being I think we'll just
disallow them.

Cheers

Martin
 
> 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 Fri Aug 10 02:50:17 2007

This archive was generated by hypermail 2.1.8 : Fri Aug 10 2007 - 02:50:17 CEST