Apache FOP/Saxon: Content is not allowed in prolog.
Posted: Fri Aug 06, 2010 10:24 pm
Hi,
this is my first XSL-FO try and this is what I get:
The location is being stated as "line -1", so I assume this must happen before the first character of my file. Now I checked for any illegal characters with and this is the result of the first line
I am using the Eclipse plugin on OS X 10.6.4, Helios Release
Build id: 20100618-0524, Saxon 6.5.5 and no special options for the transform.
The input file is a HTML-quirksmode (has several illegal attribute additions to some elements, so I created my own XSD via "Learn Document Structure" -> "Save DTD" -> "Convert DTD to XSD") but it validates without errors.
Am I doing something wrong?
this is my first XSL-FO try and this is what I get:
Code: Select all
[Apache FOP] The process 'Apache FOP' ended with code: 1. The error was: Transformer is net.sf.saxon.IdentityTransformer@1786286 Error on line 5 column 9 of sample.html_xslt: SXXP0003: Error reported by XML parser: Content is not allowed in prolog. ERROR - Exception net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException: Content is not allowed in prolog. 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:166) at org.apache.fop.cli.Main.main(Main.java:197) Caused by: net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:417) at net.sf.saxon.event.Sender.send(Sender.java:156) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32) ... 4 more Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScannerXerces.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.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:397) ... 6 more --------- net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:417) at net.sf.saxon.event.Sender.send(Sender.java:156) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32) 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:166) at org.apache.fop.cli.Main.main(Main.java:197) Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScannerXerces.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.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:397) ... 6 more --------- org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScannerXerces.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.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:397) at net.sf.saxon.event.Sender.send(Sender.java:156) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32) 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:166) at org.apache.fop.cli.Main.main(Main.java:197)
Code: Select all
od -cx <filename>
Code: Select all
0000000 < ? x m l v e r s i o n = " 1
3f3c 6d78 206c 6576 7372 6f69 3d6e 3122
Build id: 20100618-0524, Saxon 6.5.5 and no special options for the transform.
The input file is a HTML-quirksmode (has several illegal attribute additions to some elements, so I created my own XSD via "Learn Document Structure" -> "Save DTD" -> "Convert DTD to XSD") but it validates without errors.
Am I doing something wrong?