Problem with transformation scenario

Here should go questions about transforming XML with XSLT and FOP.
Shiiken
Posts: 3
Joined: Mon Aug 16, 2010 12:27 pm

Problem with transformation scenario

Post by Shiiken »

Hello everyone,

i encountered an error that i haven't been able to fix while applying the standard transformation scenario to .pdf. You find the error message below. Since i am not very familiar with oxygen and xml this might be a noobish question. I apologise in advance ;)

Best wishes,

Bastian



SystemID: I:\DOKUMENTE\DOKUMENTE\HiWi\Oxygen\Düsing_2010.08.06.xml
Beschreibung: The process 'FOP' ended with code: 1.
The error was:
16.08.2010 11:48:33 org.apache.fop.cli.Main startFOP
SCHWERWIEGEND: Exception
net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: file:/I:/DOKUMENTE/DOKUMENTE/HiWi/Oxygen/D%C3%BCsing_2010.08.06.xml_xslt:1704:-1: Error(1704/-1): fo:block is not a valid child element of fo:inline: An fo:inline that is a descendant of an fo:leader or fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.
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)

---------

net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: file:/I:/DOKUMENTE/DOKUMENTE/HiWi/Oxygen/D%C3%BCsing_2010.08.06.xml_xslt:1704:-1: Error(1704/-1): fo:block is not a valid child element of fo:inline: An fo:inline that is a descendant of an fo:leader or fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.
at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(ContentHandlerProxy.java:521)
at net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:375)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:197)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:364)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(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:371)
at net.sf.saxon.event.Sender.send(Sender.java:185)
at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:29)
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)
Caused by: org.apache.fop.fo.ValidationException: file:/I:/DOKUMENTE/DOKUMENTE/HiWi/Oxygen/D%C3%BCsing_2010.08.06.xml_xslt:1704:-1: Error(1704/-1): fo:block is not a valid child element of fo:inline: An fo:inline that is a descendant of an fo:leader or fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:411)
at org.apache.fop.fo.flow.Inline.validateChildNode(Inline.java:135)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:302)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:362)
... 19 more
---------
org.apache.fop.fo.ValidationException: file:/I:/DOKUMENTE/DOKUMENTE/HiWi/Oxygen/D%C3%BCsing_2010.08.06.xml_xslt:1704:-1: Error(1704/-1): fo:block is not a valid child element of fo:inline: An fo:inline that is a descendant of an fo:leader or fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:411)
at org.apache.fop.fo.flow.Inline.validateChildNode(Inline.java:135)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:302)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:362)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:197)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:364)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(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:371)
at net.sf.saxon.event.Sender.send(Sender.java:185)
at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:29)
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)
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Problem with transformation scenario

Post by adrian »

Hello,

What kind of XML document are you trying to transform to PDF(Docbook, DITA, TEI, FO)?

Could you provide a sample of the file that causes this problem when transformed to PDF? If possible please send it to our support email address: support@oxygenxml.com

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Shiiken
Posts: 3
Joined: Mon Aug 16, 2010 12:27 pm

Re: Problem with transformation scenario

Post by Shiiken »

Thanks for your reply,

the document i am trying to transform is a TEI P5 document. I will send it to the named address.

Best regards,
Bastian
Shiiken
Posts: 3
Joined: Mon Aug 16, 2010 12:27 pm

Re: Problem with transformation scenario

Post by Shiiken »

I have to add, the transformation to html works properly. Only the transformation to .pdf results in the given error.

Bastian
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Problem with transformation scenario

Post by adrian »

Hello,

This seems to be an error in the TEI-to-FO stylesheets(TEI XSL) which are used by Oxygen when transforming TEI to PDF(XML -> FO -> PDF).
This error is still present in the latest version of TEI XSL, 5.35 which can be found here(Stylesheets): http://sourceforge.net/projects/tei/files/

The problem appears when a note contains a highlight(hi) that, in turn, contains a line break(lb).
e.g. <note><hi><lb/></hi></note>
When transformed to fo this ends up as a footnote with an inline that contains a block. This situation is not allowed by the FO specification so as a result the Apache FOP returns the mentioned error.

We have reported the issue to the TEI-XSL development team.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem with transformation scenario

Post by Radu »

Hi,

Oxygen 12 which will be available in a couple of weeks will contain the latest TEI XSL stylesheets (5.39) which fix this problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply