|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
NPE when rendering fo:block-container inside fo:inlineHello,
I am using the Antenna House XSL stylesheets to convert XHTML to XML-FO. This works very well in most cases. However, I have come across a problem where a fo:block-container inside a fo:inline will cause an NPE. An example FO file that exhibits this problem is attached. The stack trace is also attached. If you remove the fo:inline that encloses the fo:block-container, then everything works fine. I'm wondering, is it even legal to have fo:block-container inside a fo:inline? If it is legal, any chance that this problem has been fixed in 0.95? Thank you for any insights. - Frank [test-minimal.fo] <?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:html="http://www.w3.org/1999/xhtml" writing-mode="lr-tb" hyphenate="false" text-align="start" role="html:html"> <fo:layout-master-set> <fo:simple-page-master page-width="auto" page-height="auto" master-name="all-pages"> <fo:region-body column-gap="12pt" column-count="1" margin-left="0.5in" margin-bottom="0.75in" margin-right="0.5in" margin-top="0.75in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="all-pages"> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:inline> <fo:block-container width="550px" border="1px solid gray" color="#FF2525" padding="10px" text-align="left" vertical-align="top"> <fo:block end-indent="0pt" start-indent="0pt">Test</fo:block> </fo:block-container> </fo:inline> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> 5-Sep-2008 10:07:34 AM org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) 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) --------- java.lang.NullPointerException at org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:200) at org.apache.fop.layoutmgr.inline.InlineLayoutManager.getNextKnuthElements(InlineLayoutManager.java:303) at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:654) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:590) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:106) at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:551) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:301) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:144) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:233) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:145) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 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(TransformerIdentityImpl.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) --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: NPE when rendering fo:block-container inside fo:inlineHi Frank,
Frank Worsley wrote: > Hello, > > I am using the Antenna House XSL stylesheets to convert XHTML to > XML-FO. This works very well in most cases. However, I have come > across a problem where a fo:block-container inside a fo:inline will > cause an NPE. > > An example FO file that exhibits this problem is attached. The stack > trace is also attached. If you remove the fo:inline that encloses the > fo:block-container, then everything works fine. > > I'm wondering, is it even legal to have fo:block-container inside a > fo:inline? Yes: the content model of fo:inline is the following: (#PCDATA|%inline;|%block;)* and the %block; entity includes fo:block-container. > If it is legal, any chance that this problem has been fixed > in 0.95? Your attached file runs fine with FOP 0.95, so that should be ok. > Thank you for any insights. > > - Frank HTH, Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
| Free Forum Powered by Nabble | Forum Help |