A table-cell is spanning more rows than available in its parent element

亡梦爱人 提交于 2019-12-13 10:22:38

问题


I am trying to track down the following error in my fo file [*]. Since there is no context in the error message I do not understand how I am supposed to search for the root issue.

The fo file has been generated from a proper (at least per XSD validation) docbook 5 file, but the generated fo file is not correct:

$ xmllint --nonet --noout --schema /usr/share/xml/docbook/schema/xsd/5.0/docbook.xsd source/docbook/part02/part02.xml
source/docbook/part02/part02.xml validates

How would one search the root issue (docbook level) from an input 3.2M XML-FO file ?

$ du -sh bla.fo
3.2M    bla.fo

[*]

$ fop -d bla.fo bla.pdf
[ERROR] FOP - Exception <org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.>org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:288)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
    at org.apache.fop.cli.Main.startFOP(Main.java:186)
    at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
    ... 3 more
Caused by: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
    at org.apache.fop.fo.flow.table.FixedColRowGroupBuilder.endTablePart(FixedColRowGroupBuilder.java:183)
    at org.apache.fop.fo.flow.table.VariableColRowGroupBuilder$6.play(VariableColRowGroupBuilder.java:107)
    at org.apache.fop.fo.flow.table.VariableColRowGroupBuilder.endTable(VariableColRowGroupBuilder.java:116)
    at org.apache.fop.fo.flow.table.Table.finalizeNode(Table.java:260)
    at org.apache.fop.fo.FONode.endOfNode(FONode.java:330)
    at org.apache.fop.fo.flow.table.Table.endOfNode(Table.java:243)
    at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
    at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
    ... 4 more

---------

javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
    at org.apache.fop.cli.Main.startFOP(Main.java:186)
    at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
    at org.apache.fop.fo.flow.table.FixedColRowGroupBuilder.endTablePart(FixedColRowGroupBuilder.java:183)
    at org.apache.fop.fo.flow.table.VariableColRowGroupBuilder$6.play(VariableColRowGroupBuilder.java:107)
    at org.apache.fop.fo.flow.table.VariableColRowGroupBuilder.endTable(VariableColRowGroupBuilder.java:116)
    at org.apache.fop.fo.flow.table.Table.finalizeNode(Table.java:260)
    at org.apache.fop.fo.FONode.endOfNode(FONode.java:330)
    at org.apache.fop.fo.flow.table.Table.endOfNode(Table.java:243)
    at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
    at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
    ... 4 more
---------
org.apache.fop.fo.ValidationException: A table-cell is spanning more rows than available in its parent element.
    at org.apache.fop.fo.flow.table.FixedColRowGroupBuilder.endTablePart(FixedColRowGroupBuilder.java:183)
    at org.apache.fop.fo.flow.table.VariableColRowGroupBuilder$6.play(VariableColRowGroupBuilder.java:107)
    at org.apache.fop.fo.flow.table.VariableColRowGroupBuilder.endTable(VariableColRowGroupBuilder.java:116)
    at org.apache.fop.fo.flow.table.Table.finalizeNode(Table.java:260)
    at org.apache.fop.fo.FONode.endOfNode(FONode.java:330)
    at org.apache.fop.fo.flow.table.Table.endOfNode(Table.java:243)
    at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
    at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
    at org.apache.fop.cli.Main.startFOP(Main.java:186)
    at org.apache.fop.cli.Main.main(Main.java:217)

回答1:


Try validating your DocBook XML using oXygen XML Editor 18.1. According to the oXygen folks, it has improved DocBook table validation: https://lists.oasis-open.org/archives/docbook-apps/201611/msg00044.html



来源:https://stackoverflow.com/questions/41037060/a-table-cell-is-spanning-more-rows-than-available-in-its-parent-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!