You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Kelly Campbell <ca...@channelpoint.com> on 2000/12/13 01:09:24 UTC

[patch] id bug in tables

I ran into a interesting problem today. FOP was giving a duplicate ID fatal
error from an ID on a table row that extended past the end of the page
because it tried to add the id again when it started rendering the second
page.

Here's a patch for it.

-Kelly
--
Kelly A. Campbell                       Software Engineer
<ca...@channelpoint.com>                 ChannelPoint, Inc.
<ca...@merlotxml.org>                    Colorado Springs, Co.



Re: [patch] id bug in tables

Posted by Kelly Campbell <ca...@camk.net>.
Hmm... looks like that file did change quite a bit in between. Sorry I 
hadn't checked for the latest version before adding the fix. In my 
version, the createID call takes place within the if (cells==null) 
statement because in the particular case I ran into, the table cell was 
started on one page, the ID was created, then it calculated that there 
wasn't enough space for even the first line (I think it had a 
space-before) and so it left the marker at START and went on to the next 
page.  

I think the newer version of the code may work ok (without my fix), but I
can't check as I don't have the fo file anymore. It was rendered via
xsl->fo, and the content in the original xml has changed just enough not
to trigger the bug anymore :-( I can see if I can recreate the problem
with a test case tommorrow. I don't think leaving the patch in as-is will
hurt anything since configID will be true and marker will equal 0 in every
case where marker begins at START. So it's basically no change to any 
logic as it is right now.

-Kelly

On Wed, Dec 13, 2000 at 01:37:52PM +1000, Keiron Liddle wrote:
> Kelly,
> 
> I have applied the patch (by hand since the a file had changed) and it 
> all looks ok.
> Can you check that it has done the right thing.
> 
> Kelly Campbell wrote:
> 
> > I ran into a interesting problem today. FOP was giving a duplicate ID fatal
> > error from an ID on a table row that extended past the end of the page
> > because it tried to add the id again when it started rendering the second
> > page.
> > 
> > Here's a patch for it.
> 

-- 
Kelly A. Campbell                        Software Engineer
camk@channelpoint.com                    Channelpoint, Inc.
camk@camk.net  camk@merlotxml.org        Colorado Springs, Co.

Re: [patch] id bug in tables

Posted by Keiron Liddle <ke...@aftexsw.com>.
Kelly,

I have applied the patch (by hand since the a file had changed) and it 
all looks ok.
Can you check that it has done the right thing.

Kelly Campbell wrote:

> I ran into a interesting problem today. FOP was giving a duplicate ID fatal
> error from an ID on a table row that extended past the end of the page
> because it tried to add the id again when it started rendering the second
> page.
> 
> Here's a patch for it.