Issues

ZF2-98: Manual build to PDF target fails due to XSLT problem

Description

Building the manual from latest git src into PDF target fails due to wrong XSLT rule or wrong XML structure.

Dependencies (for PDF build): - autoconf - make - xsltproc - xmllint - FOP hyphenation support (missing from Ubuntu packages due to proprietary issues but available from: http://offo.sourceforge.net/hyphenation/) - xinclude (that is a part of libxml2-utils DEB package)

Autoconf && ./configure succeeds, but "make pdf" fails with the following nasty Java exception:

javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: {PATH}/zf2/documentation/manual/en/ZendFramework.fo:157:315: Error(157/315): fo:page-sequence is not a valid child element of fo:flow. 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) Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: {PATH}/zf2/documentation/manual/en/ZendFramework.fo:157:315: Error(157/315): fo:page-sequence is not a valid child element of fo:flow. at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165) ... 3 more Caused by: org.apache.fop.fo.ValidationException: {PATH}/zf2/documentation/manual/en/ZendFramework.fo:157:315: Error(157/315): fo:page-sequence is not a valid child element of fo:flow. at org.apache.fop.fo.FONode.invalidChildError(FONode.java:411) at org.apache.fop.fo.FONode.invalidChildError(FONode.java:396) at org.apache.fop.fo.pagination.Flow.validateChildNode(Flow.java:106) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:302) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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:485) ... 4 more

The problem is that the generated XML structure does not qualify to the defined XSLT because according to the XSLT fo:page-sequence cannot be a child tag of fo:flow. I reproduced the problem on Ubuntu 11.10 and Debian Lenny but I have no other Unix distros to test on. However I think it is not a distro specific problem I would like somebody to confirm this issue before I dig into deep XSLT things (not my best aand favourite skills).

Comments

This will fixed after PR #1016 was merged

Fix merged