0
我使用FOP 1.1爲了從xml文檔生成pdf文件。 FOP文檔在這裏http://xmlgraphics.apache.org/fop/如何正確地允許頁面中斷在fop xml中?
pdf文檔生成正常。但是,我一直在收到這個嚴重警告信息。我不知道如何解決這個問題。
SEVERE: Invalid property value encountered in break-after="": org.apache.fop.fo.expr.PropertyException: No conversion defined ; property:'break-after' (No context info available)
org.apache.fop.fo.expr.PropertyException: No conversion defined ; property:'break-after'
at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:446)
at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:413)
at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:321)
at org.apache.fop.fo.FObj.processNode(FObj.java:122)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175)
at org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)
at org.apache.xml.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:243)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:139)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
at org.apache.fop.cli.Main.startFOP(Main.java:177)
at org.apache.fop.cli.Main.main(Main.java:208)
我有以下代碼
<xsl:template match="br">
<fo:block break-after="{@break}"></fo:block>
</xsl:template>
<xsl:attribute-set name="page.break">
<xsl:attribute name="break-after">page</xsl:attribute>
</xsl:attribute-set>
你最有可能有一個 'BR' 元素沒有'break'屬性,因此'break-after'屬性最終爲空。 – 2014-12-04 00:30:50
嗯你是什麼意思?我對此並不怎麼看好。你可以給我一個例子嗎? – 2014-12-04 01:09:05