https://issues.apache.org/bugzilla/show_bug.cgi?id=37579





--- Comment #50 from Vincent Hennebert <[EMAIL PROTECTED]>  2008-05-28 08:30:54 
PST ---
(In reply to comment #49)
> (In reply to comment #48)
> > 
> > AFAIU the reason why FootnoteBodyLM is re-parented is that it put its areas 
> > at
> > the right place (as children of the footnote-reference-area, instead of the
> > block containing the footnote). Simply moving the setParent call after the 
> > call
> > to getNextKnuthElements makes the warnings disappear, and doesn't break any
> > test.
> > Confirmation from specialists of this part of the code would be appreciated 
> > ;-)
> 
> Seems reasonable to me. Cleaner than overriding getParent() anyway.
> 
> In the meantime, I've also been playing with adding an interface
> FootnoteCitationHolder. Such an interface could then be implemented by
> KnuthBlockBox and ActiveCell. The interface methods can be used by
> LineLayoutManager, PageBreaker, ListItemLayoutManager, TableStepper...
> 
> The methods would roughly be:
> hasAnchors()
> getFootnoteBodyLMs()
> addFootnotes(List<KnuthElement>)
> addFootnotes(FootnoteCitationHolder)
> addFootnote(FootnoteCitationHolder.Citation)
> expandFootnotes(LayoutManager, LayoutContext, int)
> 
> While this would still leave the related portions of code distributed over
> those classes, the interface makes it a bit easier to locate them in an IDE,
> and makes those pieces of code a bit more uniform.
> 
> Most of the loops we see now, would move to KnuthBlockBox, as the only 
> complete
> implementation. ActiveCell would only implement what is needed to make the
> citations accessible to the box created by TableStepper. Slight compromise in
> comparison to the last patch is that, in the iteration over the active cells,
> we would only create a temporary list with those having citations. If the list
> is empty, we create a regular box. If not, then we iterate over that temporary
> list of cells, and instruct the created KnuthBlockBox to add the citations 
> from
> those cells. The same pattern can be used by ListItemLayoutManager:
> 
> - create a temporary list of FootnoteCitationHolders for which hasAnchors()
> returns true
> - if non-empty, iterate over that temporary list
> - for each element, ask the higher level FootnoteCitationHolder 
> (KnuthBlockBox)
> to extract the citations, and add them to its own list.
> 
> I'll see if I can attach a patch to demonstrate one of these days.

I've been asked to look into this issue, so I committed a partial and temporary
fix based on the latest patch:
http://svn.apache.org/viewvc?view=rev&revision=660979
Footnotes in table headers and footers are not handled yet, and anyway I think
it's best to wait for clarification from xsl-editors before implementing
anything (which gives us a couple of months ;-) ).

That doesn't prevent you from exploring your ideas above, though. I await your
patch.

Vincent


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to