XSLT Transformation and FOP

Here should go questions about transforming XML with XSLT and FOP.
JasonCFowler
Posts: 1
Joined: Thu May 26, 2011 10:56 pm

XSLT Transformation and FOP

Post by JasonCFowler »

Hi. I've used Oxygen before, but I'm still kind of new to it. I have a TEI 5 document that I am trying to convert to PDF, but Oxygen keeps giving me an error I've not been able to debug. Conversion to XHTML works, but PDF doesn't.

Thank you in advance for any help.

Here is what the error says

Code: Select all

SystemID: /home/jfowler/FullerThoughs.xml
Engine name: Apache FOP
Severity: error
Description: The process 'Apache FOP' ended with code: 1.
The error was:
ERROR - Exception
net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}footnote" is not a valid child of "fo:block"! (See position 406:-1)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}footnote" is not a valid child of "fo:block"! (See position 406:-1)
at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source)
at net.sf.saxon.event.ContentHandlerProxy.startContent(Unknown Source)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:197)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:351)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:400)
at net.sf.saxon.event.Sender.send(Sender.java:154)
at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:35)
... 4 more
Caused by: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}footnote" is not a valid child of "fo:block"! (See position 406:-1)
at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy0.invalidChild(Unknown Source)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:534)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:517)
at org.apache.fop.fo.flow.Block.validateChildNode(Block.java:291)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:267)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
... 20 more

---------

net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}footnote" is not a valid child of "fo:block"! (See position 406:-1)
at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source)
at net.sf.saxon.event.ContentHandlerProxy.startContent(Unknown Source)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:197)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:351)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:400)
at net.sf.saxon.event.Sender.send(Sender.java:154)
at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:35)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}footnote" is not a valid child of "fo:block"! (See position 406:-1)
at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy0.invalidChild(Unknown Source)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:534)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:517)
at org.apache.fop.fo.flow.Block.validateChildNode(Block.java:291)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:267)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
... 20 more
---------
org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}footnote" is not a valid child of "fo:block"! (See position 406:-1)
at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy0.invalidChild(Unknown Source)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:534)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:517)
at org.apache.fop.fo.flow.Block.validateChildNode(Block.java:291)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:267)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
at net.sf.saxon.event.ContentHandlerProxy.startContent(Unknown Source)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:197)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:351)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:400)
at net.sf.saxon.event.Sender.send(Sender.java:154)
at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:35)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)

Briotti
Posts: 16
Joined: Mon Jan 10, 2011 6:02 pm

Re: XSLT Transformation and FOP

Post by Briotti »

Hi Jason, it seems that a fo:footnote is not correct placed.

I suggest to apply your transformation scenario just converting your xml to xsl-fo (whitout rendering to pdf) then open the fo file in oxygen and check where is the error.
Post Reply