java.lang.NullPointerException:
at org.apache.fop.fo.flow.PageNumberCitation.startOfNode(PageNumberCitat
ion.java:115)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuil
der.java:329)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Tra
nsformerIdentityImpl.java:1072)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)

The issue is partly fixed in FOP Trunk. page-number-citations in markers no longer throw an Exception, but there is still a remaining problem for the forward reference: in the example 'hide.fo', the retrieved marker shows 'page 2 of 1'.

Additionally, there appears to be a problem with with instream-foreign-object in markers. In the example 'hide.fo', the embedded SVG does not render at all (note: after changing stroke and fill to 'red' instead of 'white'... First wasted a lot of time wondering why I did not see any rectangle, then noticed it was a completely white one :-S )

Andreas L. Delmelle
added a comment - 27/Jun/08 11:51 Already adding this note for completeness (already mentioned on fop-users@ yesterday)
The issue is partly fixed in FOP Trunk. page-number-citations in markers no longer throw an Exception, but there is still a remaining problem for the forward reference: in the example 'hide.fo', the retrieved marker shows 'page 2 of 1'.
Additionally, there appears to be a problem with with instream-foreign-object in markers. In the example 'hide.fo', the embedded SVG does not render at all (note: after changing stroke and fill to 'red' instead of 'white'... First wasted a lot of time wondering why I did not see any rectangle, then noticed it was a completely white one :-S )

> The issue is partly fixed in FOP Trunk. page-number-citations in markers no
> longer throw an Exception, but there is still a remaining problem for the
> forward reference: in the example 'hide.fo', the retrieved marker shows 'page 2
> of 1'.

Looking closer, the output does seem to be correct. The fo:marker in fo:block[@id='end-seq1'] still belongs to page 1. The second page is an empty page that is produced by the fact that the second page-sequence has an odd initial-page-number. Setting force-page-count to 'no-force' on the first, generates only one page.

So, the bug concerning forward-references is fixed in FOP Trunk now.
I have also added a disabled tescase for the remaining problem with instream-foreign-object.

Andreas L. Delmelle
added a comment - 29/Jun/08 05:10 (In reply to comment #2)
> The issue is partly fixed in FOP Trunk. page-number-citations in markers no
> longer throw an Exception, but there is still a remaining problem for the
> forward reference: in the example 'hide.fo', the retrieved marker shows 'page 2
> of 1'.
Looking closer, the output does seem to be correct. The fo:marker in fo:block [@id='end-seq1'] still belongs to page 1. The second page is an empty page that is produced by the fact that the second page-sequence has an odd initial-page-number. Setting force-page-count to 'no-force' on the first, generates only one page.
So, the bug concerning forward-references is fixed in FOP Trunk now.
I have also added a disabled tescase for the remaining problem with instream-foreign-object.
see:
http://svn.apache.org/viewvc?rev=672010&view=rev
http://svn.apache.org/viewvc?rev=672496&view=rev
http://svn.apache.org/viewvc?rev=672617&view=rev
Thanks for reporting!