You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Browning, Jamie" <Ja...@catlin.com> on 2008/06/26 17:06:52 UTC
Forward references in marker element throws NPE
All
Am I right in assuming that forward references in marker elements no
longer work in FOP 0.9x? My assumption is based on the fact that the
marker examples included in the binary dist for both 0.94 and 0.95beta
are throwing a NullPointerException.
For example: I need to different footers to appear in my document
depending on the current location. I have previously implemented these
using markers, where a new marker is added after the point in the
document where the footer needs to change is reached.
I haven't included any source code in this mail because it seems like a
well known issue. I can add some source if further clarification is
required.
TIA
Jamie Browning
Senior Developer
theFrame Programme
Catlin Underwriting Agencies Limited
Phone: +44 (0)20 7015 0981
E-mail: jbrowning@catlin.com
Catlin Underwriting Agencies Ltd and Catlin Insurance Company (UK)
Limited are authorised and regulated by the Financial Services
Authority.
RE: Forward references in marker element throws NPE
Posted by "Browning, Jamie" <Ja...@catlin.com>.
Many, many thanks Andreas. More than anything else you prompt response
and willingness to help is what will enable me to go forward with the
upgrade.
Apologies for my cheekiness but I have one final request. Would it be ok
for me to contact you off-list for some advice on how I might patch the
build myself.
Jamie Browning
theFrame Programme
Phone: +44 (0)20 7015 0981
E-mail: jbrowning@catlin.com
-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be]
Sent: 03 July 2008 19:26
To: fop-users@xmlgraphics.apache.org
Subject: Re: Forward references in marker element throws NPE
On Jul 2, 2008, at 19:54, Andreas Delmelle wrote:
> On Jul 2, 2008, at 11:30, Browning, Jamie wrote:
>
> Hi Jamie
>
>> If there is any way in which I can positively influence the
>> decision to
>> include this patch then I would like to do so.
>
> You're playing with fire here... |8->
>
> In the meantime, I have already applied the changes. It's literally
> only a hit on the <Enter> button away from being committed to the
> release branch.
Just FYI: this is done.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 2, 2008, at 19:54, Andreas Delmelle wrote:
> On Jul 2, 2008, at 11:30, Browning, Jamie wrote:
>
> Hi Jamie
>
>> If there is any way in which I can positively influence the
>> decision to
>> include this patch then I would like to do so.
>
> You're playing with fire here... |8->
>
> In the meantime, I have already applied the changes. It's literally
> only a hit on the <Enter> button away from being committed to the
> release branch.
Just FYI: this is done.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 2, 2008, at 11:30, Browning, Jamie wrote:
Hi Jamie
> If there is any way in which I can positively influence the
> decision to
> include this patch then I would like to do so.
You're playing with fire here... |8->
In the meantime, I have already applied the changes. It's literally
only a hit on the <Enter> button away from being committed to the
release branch.
Now, let's see... What shall I charge you for that? ;-)
Seriously, I guess 'lazy consensus' means if no one objects before
tomorrow, I'll just go ahead.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Forward references in marker element throws NPE
Posted by "Browning, Jamie" <Ja...@catlin.com>.
Andreas
Thanks again for your clear response.
If there is any way in which I can positively influence the decision to
include this patch then I would like to do so.
I am currently employed in a financial services (Insurance) company in
the UK, where we are undertaking an upgrade of our use of FOP from
version 0.20.5 to 0.94 (or 0.95 depending on likely release date).
Unfortunately this bug is a real show-stopper as we have to preserve
existing documents. In the Insurance industry it is vital to be able to
vary elements (in this case document footers) based on the
content/position of the page within the document. In many cases there is
a legal requirement for certain company details to appear on certain
pages.
The way we are currently doing this is through the use of the <marker>
element. Unfortunately in most cases the document footer must also
contain pagination details (e.g. Page 1 of 10) and it is this feature
that has regressed in 0.94/5.
I am sure that there is alternative way to achieve this and for new
documents that is no problem. Refactoring existing documents is much
more of a pain and more time-consuming (cost).
Jamie Browning
theFrame Programme
Phone: +44 (0)20 7015 0981
E-mail: jbrowning@catlin.com
-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be]
Sent: 01 July 2008 19:45
To: fop-users@xmlgraphics.apache.org
Subject: Re: Forward references in marker element throws NPE
On Jul 1, 2008, at 16:02, Browning, Jamie wrote:
Hi Jamie,
> Many thanks for your prompt responses Andreas/Chris
>
> Andreas I have seen your commit on Bugzilla. One question I have
> though
> is will this fix be merged into the 0.95 release candidate?
I guess I could commit it to the release branch as well, but I would
rather see confirmation from other devs first.
No problem for me to apply this fix to 0.95 (after all, it's only a
very small patch), but if someone's already preparing the release,
I'd rather not get in their way...
Anyone?
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 1, 2008, at 16:02, Browning, Jamie wrote:
Hi Jamie,
> Many thanks for your prompt responses Andreas/Chris
>
> Andreas I have seen your commit on Bugzilla. One question I have
> though
> is will this fix be merged into the 0.95 release candidate?
I guess I could commit it to the release branch as well, but I would
rather see confirmation from other devs first.
No problem for me to apply this fix to 0.95 (after all, it's only a
very small patch), but if someone's already preparing the release,
I'd rather not get in their way...
Anyone?
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Forward references in marker element throws NPE
Posted by "Browning, Jamie" <Ja...@catlin.com>.
Many thanks for your prompt responses Andreas/Chris
Andreas I have seen your commit on Bugzilla. One question I have though
is will this fix be merged into the 0.95 release candidate?
Jamie Browning
theFrame Programme
Phone: +44 (0)20 7015 0981
E-mail: jbrowning@catlin.com
-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be]
Sent: 26 June 2008 21:15
To: fop-users@xmlgraphics.apache.org
Subject: Re: Forward references in marker element throws NPE
On Jun 26, 2008, at 21:33, Andreas Delmelle wrote:
>>
>> On Jun 26, 2008, at 17:06, Browning, Jamie wrote:
>>> My assumption is based on the fact that the marker examples
>>> included in the binary dist for both 0.94 and 0.95beta are
>>> throwing a NullPointerException.
>
> I'll see what I can find based on this, and will keep you posted.
I have already found and fixed one cause of a NullPointerException,
but stumbled on another one.
Forward-references work OK now in FOP Trunk, after but the
fo:instream-foreign-object in fo:marker still crashes...
I'm going to look closer into that one as well, and add that example
to the unit-tests (so as to avoid further embarrassment :-S )
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 26, 2008, at 21:33, Andreas Delmelle wrote:
>>
>> On Jun 26, 2008, at 17:06, Browning, Jamie wrote:
>>> My assumption is based on the fact that the marker examples
>>> included in the binary dist for both 0.94 and 0.95beta are
>>> throwing a NullPointerException.
>
> I'll see what I can find based on this, and will keep you posted.
I have already found and fixed one cause of a NullPointerException,
but stumbled on another one.
Forward-references work OK now in FOP Trunk, after but the
fo:instream-foreign-object in fo:marker still crashes...
I'm going to look closer into that one as well, and add that example
to the unit-tests (so as to avoid further embarrassment :-S )
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 26, 2008, at 21:20, Andreas Delmelle wrote:
Errm... Sorry, one of those days...
Just noticed:
> On Jun 26, 2008, at 17:06, Browning, Jamie wrote:
>> My assumption is based on the fact that the marker examples
>> included in the binary dist for both 0.94 and 0.95beta are
>> throwing a NullPointerException.
:-)
I'll see what I can find based on this, and will keep you posted.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 26, 2008, at 17:06, Browning, Jamie wrote:
> Am I right in assuming that forward references in marker elements
> no longer work in FOP 0.9x?
>
Not sure if I understand your question correctly...
Do you mean something like:
<fo:marker marker-class-name="sample"><fo:page-number-citation ref-
id="{$forward-reference}" /></fo:marker>
?
I assume so, as a fo:retrieve-marker can only retrieve markers from
the current or preceding pages. One cannot retrieve a marker that is
attached to an area on following pages.
> My assumption is based on the fact that the marker examples
> included in the binary dist for both 0.94 and 0.95beta are throwing
> a NullPointerException.
>
> For example: I need to different footers to appear in my document
> depending on the current location. I have previously implemented
> these using markers, where a new marker is added after the point in
> the document where the footer needs to change is reached.
>
> I haven’t included any source code in this mail because it seems
> like a well known issue. I can add some source if further
> clarification is required.
>
That would be very helpful, and save us some time. Crashing with a
NullPointerException is definitely buggy.
Thanks,
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forward references in marker element throws NPE
Posted by Chris Bowditch <bo...@hotmail.com>.
Browning, Jamie wrote:
> All
>
> Am I right in assuming that forward references in marker elements no
> longer work in FOP 0.9x? My assumption is based on the fact that the
> marker examples included in the binary dist for both 0.94 and 0.95beta
> are throwing a NullPointerException.
A NPE is bad indeed. Can you open a bug in bugzilla and attach some
sample FO that demonstrates the problem?
https://issues.apache.org/bugzilla/index.cgi
>
> For example: I need to different footers to appear in my document
> depending on the current location. I have previously implemented these
> using markers, where a new marker is added after the point in the
> document where the footer needs to change is reached.
Despite of the NPE, markers are not supposed to be forward referencable.
The fo:retrieve-marker is supposed to look on the current page and
previous pages, never subsequent pages. However, it should still be
possible to achieve changing footers using markers, but you will need to
ensure that markers occur more frequently within the document so that a
forward lookup is not required.
>
> I haven’t included any source code in this mail because it seems like a
> well known issue. I can add some source if further clarification is
> required.
Thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org