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 "Unger, Joachim" <Jo...@softwareag.com> on 2006/02/17 17:50:26 UTC

Property id is unique but FOP 0.91 reports an error.

Hi,

I have the master set:

	<fo:layout-master-set>
		<fo:simple-page-master margin-bottom="0mm"
margin-top="0mm" margin-right="1cm" margin-left="8mm"
page-height="297mm" page-width="210mm" master-name="first-page">
			<fo:region-body margin-left="12mm"
margin-top="120mm" margin-bottom="43.5mm"/>
			<fo:region-before extent="120mm"
region-name="xsl-region-before-1"/>
			<fo:region-after
region-name="xsl-region-after-1" extent="41mm"/>
		</fo:simple-page-master>
		<fo:simple-page-master margin-bottom="0mm"
margin-top="0mm" margin-right="1cm" margin-left="8mm"
page-height="297mm" page-width="210mm" master-name="others">
			<fo:region-body margin-left="12mm"
margin-top="105mm" margin-bottom="43.5mm"/>
			<fo:region-before extent="105mm"
region-name="xsl-region-before-2"/>
			<fo:region-after
region-name="xsl-region-after-1" extent="41mm"/>
		</fo:simple-page-master>
		<fo:page-sequence-master master-name="standard">
			<fo:repeatable-page-master-alternatives>
				<fo:conditional-page-master-reference
master-reference="first-page" page-position="first"/>
				<fo:conditional-page-master-reference
master-reference="others" page-position="rest"/>
			</fo:repeatable-page-master-alternatives>
		</fo:page-sequence-master>
	</fo:layout-master-set>

There is a reference 

  <fo:page-number/>/<fo:page-number-citation ref-id="lastPage"/>

inside xsl-region-before-1 (1st page) and xsl-region-before-2 (others)
to a unique id="lastPage".

"lastPage" is only once defined in <fo:root>

				.....
				</fo:table>
			</fo:block>
			<fo:block id="lastPage"/>
		</fo:flow>
	</fo:page-sequence>
</fo:root>

FOP 0.91 tells me "org.apache.fop.fo.ValidationException: null:15463:26:
Property id "lastPage" previously used; id values must be unique in
document." for every pdf document that has more than 1 page.

Is this an bug issue?

Regards,

Joachim Unger



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: AW: Property id is unique but FOP 0.91 reports an error.

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Joachim,

as described in [1] reusing Fop instances is discouraged in 0.90 and
later. I'm currently working on a few changes that will address
performance considerations around reusable objects in FOP. The Fop
instance (and to a certain degree the FOUserAgent instance) are designed
to be one-use objects. The setup overhead for each rendering run is
minimal comparing that to the amount of new objects that have to be
(re)created for each rendering run (FO tree, layout engine, area tree,
renderers, PDF library). I also recently introduced a check in FOP Trunk
that will notify you if you try to reuse the Fop instance. So, please
don't reuse Fop instances.

[1] http://xmlgraphics.apache.org/fop/latest/embedding.html#basics

On 18.02.2006 12:55:44 Unger, Joachim wrote:
> Hi Jeremias,
> 
> my mistake. I retried to render a pdf document after a java.lang.NullPointerException and reused the same Fop-instance.
> 
> No idea about the NPE. I will try to get more information.
> 
> Regards,
> 
> Joachim 
> 
> -----Ursprüngliche Nachricht-----
> Von: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Gesendet: Freitag, 17. Februar 2006 21:55
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: Property id is unique but FOP 0.91 reports an error.
> 
> Hmm, we have a test for that in our test suite which test exactly that
> scenario: http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-number-citation_basic.xml
> 
> Would you please put together a full FO file that produces this error message? Thanks!
> 
> On 17.02.2006 17:50:26 Unger, Joachim wrote:
> > Hi,
> > 
> > I have the master set:
> > 
> > 	<fo:layout-master-set>
> > 		<fo:simple-page-master margin-bottom="0mm"
> > margin-top="0mm" margin-right="1cm" margin-left="8mm"
> > page-height="297mm" page-width="210mm" master-name="first-page">
> > 			<fo:region-body margin-left="12mm"
> > margin-top="120mm" margin-bottom="43.5mm"/>
> > 			<fo:region-before extent="120mm"
> > region-name="xsl-region-before-1"/>
> > 			<fo:region-after
> > region-name="xsl-region-after-1" extent="41mm"/>
> > 		</fo:simple-page-master>
> > 		<fo:simple-page-master margin-bottom="0mm"
> > margin-top="0mm" margin-right="1cm" margin-left="8mm"
> > page-height="297mm" page-width="210mm" master-name="others">
> > 			<fo:region-body margin-left="12mm"
> > margin-top="105mm" margin-bottom="43.5mm"/>
> > 			<fo:region-before extent="105mm"
> > region-name="xsl-region-before-2"/>
> > 			<fo:region-after
> > region-name="xsl-region-after-1" extent="41mm"/>
> > 		</fo:simple-page-master>
> > 		<fo:page-sequence-master master-name="standard">
> > 			<fo:repeatable-page-master-alternatives>
> > 				<fo:conditional-page-master-reference
> > master-reference="first-page" page-position="first"/>
> > 				<fo:conditional-page-master-reference
> > master-reference="others" page-position="rest"/>
> > 			</fo:repeatable-page-master-alternatives>
> > 		</fo:page-sequence-master>
> > 	</fo:layout-master-set>
> > 
> > There is a reference
> > 
> >   <fo:page-number/>/<fo:page-number-citation ref-id="lastPage"/>
> > 
> > inside xsl-region-before-1 (1st page) and xsl-region-before-2 (others) 
> > to a unique id="lastPage".
> > 
> > "lastPage" is only once defined in <fo:root>
> > 
> > 				.....
> > 				</fo:table>
> > 			</fo:block>
> > 			<fo:block id="lastPage"/>
> > 		</fo:flow>
> > 	</fo:page-sequence>
> > </fo:root>
> > 
> > FOP 0.91 tells me "org.apache.fop.fo.ValidationException: null:15463:26:
> > Property id "lastPage" previously used; id values must be unique in 
> > document." for every pdf document that has more than 1 page.
> > 
> > Is this an bug issue?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Property id is unique but FOP 0.91 reports an error.

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, we have a test for that in our test suite which test exactly that
scenario: http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-number-citation_basic.xml

Would you please put together a full FO file that produces this error
message? Thanks!

On 17.02.2006 17:50:26 Unger, Joachim wrote:
> Hi,
> 
> I have the master set:
> 
> 	<fo:layout-master-set>
> 		<fo:simple-page-master margin-bottom="0mm"
> margin-top="0mm" margin-right="1cm" margin-left="8mm"
> page-height="297mm" page-width="210mm" master-name="first-page">
> 			<fo:region-body margin-left="12mm"
> margin-top="120mm" margin-bottom="43.5mm"/>
> 			<fo:region-before extent="120mm"
> region-name="xsl-region-before-1"/>
> 			<fo:region-after
> region-name="xsl-region-after-1" extent="41mm"/>
> 		</fo:simple-page-master>
> 		<fo:simple-page-master margin-bottom="0mm"
> margin-top="0mm" margin-right="1cm" margin-left="8mm"
> page-height="297mm" page-width="210mm" master-name="others">
> 			<fo:region-body margin-left="12mm"
> margin-top="105mm" margin-bottom="43.5mm"/>
> 			<fo:region-before extent="105mm"
> region-name="xsl-region-before-2"/>
> 			<fo:region-after
> region-name="xsl-region-after-1" extent="41mm"/>
> 		</fo:simple-page-master>
> 		<fo:page-sequence-master master-name="standard">
> 			<fo:repeatable-page-master-alternatives>
> 				<fo:conditional-page-master-reference
> master-reference="first-page" page-position="first"/>
> 				<fo:conditional-page-master-reference
> master-reference="others" page-position="rest"/>
> 			</fo:repeatable-page-master-alternatives>
> 		</fo:page-sequence-master>
> 	</fo:layout-master-set>
> 
> There is a reference 
> 
>   <fo:page-number/>/<fo:page-number-citation ref-id="lastPage"/>
> 
> inside xsl-region-before-1 (1st page) and xsl-region-before-2 (others)
> to a unique id="lastPage".
> 
> "lastPage" is only once defined in <fo:root>
> 
> 				.....
> 				</fo:table>
> 			</fo:block>
> 			<fo:block id="lastPage"/>
> 		</fo:flow>
> 	</fo:page-sequence>
> </fo:root>
> 
> FOP 0.91 tells me "org.apache.fop.fo.ValidationException: null:15463:26:
> Property id "lastPage" previously used; id values must be unique in
> document." for every pdf document that has more than 1 page.
> 
> Is this an bug issue?
> 
> Regards,
> 
> Joachim Unger


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org