Problems with PDF display
Brought to you by:
ovidiu
|
From: Richard G R. <ril...@go...> - 2007-12-08 11:02:12
|
I have the following errors when rendering as PDF an XML file (follows) ,---- | Running the Saxon processor... | Done invoking Saxon. | XSLT processing finished, running FOP processor... | Message: Using com.icl.saxon.aelfred.SAXDriver as SAX2 Parser | Info: building formatting object tree | Message: setting up fonts | Error: Unknown formatting object ^html | Info: Parsing of document complete, stopping renderer | org.apache.fop.apps.FOPException: Root element must be root, not (none):html | at org.apache.fop.fo.FOTreeBuilder.startElement(Unknown Source) | at com.icl.saxon.aelfred.SAXDriver.startElement(SAXDriver.java:757) | at com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1036) | at com.icl.saxon.aelfred.XmlParser.parseDocument(XmlParser.java:510) | at com.icl.saxon.aelfred.XmlParser.doParse(XmlParser.java:163) | at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:320) | at org.apache.fop.apps.Driver.render(Unknown Source) | at org.apache.fop.apps.Driver.run(Unknown Source) | at xslt.debugger.Manager.convertToPDF(Manager.java:491) | at xslt.debugger.cmdline.Controller.convertToPDF(Controller.java:620) | at java.lang.reflect.Method.invoke(libgcj.so.81) | at xslt.debugger.cmdline.Controller.mainLoop(Controller.java:1085) | at xslt.debugger.cmdline.Controller.main(Controller.java:191) | | Root element must be root, not (none):html | Fontifying *xslt errors*... (regexps...............................................) | Root element must be root, not (none):html | error in process filter: save-excursion: Buffer is read-only: #<buffer *xslt errors*> | error in process filter: Buffer is read-only: #<buffer *xslt errors*> | Done invoking Saxon. | Starting 'acroread' PDF viewer... | Starting PDF viewer 'acroread'...done. `---- Acroread starts saying it is an empty document. The XML/XSL work great for displaying in buffer and in the browser. xslt-process is latest from the sourceforge site. I am new to this, so apologies if its something silly like not being able to access my local XSL, but it seems the XSL processing is finished. Emacs versions ,---- | GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-11-03 on pacem, modified by Debian `---- XML (from example web page) ,---- | <?xml version="1.0"?> | <?xml-stylesheet type="text/xml" href="atoms.xsl"?> | <PERIODIC_TABLE> | <ATOM STATE="GAS"> | <NAME>Hydrogen</NAME> | <SYMBOL>H</SYMBOL> | <ATOMIC_NUMBER>1</ATOMIC_NUMBER> | <ATOMIC_WEIGHT>1.00794</ATOMIC_WEIGHT> | <BOILING_POINT UNITS="Kelvin">20.28</BOILING_POINT> | <MELTING_POINT UNITS="Kelvin">13.81</MELTING_POINT> | <DENSITY UNITS="grams/cubic centimeter"> | <!-- At 300K, 1 atm --> | 0.0000899 | </DENSITY> | </ATOM> | <ATOM STATE="GAS"> | <NAME>Helium</NAME> | <SYMBOL>He</SYMBOL> | <ATOMIC_NUMBER>2</ATOMIC_NUMBER> | <ATOMIC_WEIGHT>4.0026</ATOMIC_WEIGHT> | <BOILING_POINT UNITS="Kelvin">4.216</BOILING_POINT> | <MELTING_POINT UNITS="Kelvin">0.95</MELTING_POINT> | <DENSITY UNITS="grams/cubic centimeter"><!-- At 300K --> | 0.0001785 | </DENSITY> | </ATOM> | </PERIODIC_TABLE> `---- XSL: ,---- | <?xml version="1.0"?> | <xsl:stylesheet version="1.0" | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | <xsl:template match="/"> | <html> | <head> | <title>Atomic Number vs. Atomic Weight</title> | </head> | <body> | <xsl:apply-templates select="PERIODIC_TABLE"/> | </body> | </html> | </xsl:template> | <xsl:template match="PERIODIC_TABLE"> | <h1>Atomic Number vs. Atomic Weight</h1> | <table> | <th>Element</th> | <th>Atomic Number</th> | <th>Atomic Weight</th> | <xsl:apply-templates select="ATOM"/> | </table> | </xsl:template> | <xsl:template match="ATOM"> | <tr> | <td><xsl:value-of select="NAME"/></td> | <td><xsl:value-of select="ATOMIC_NUMBER"/></td> | <td><xsl:value-of select="ATOMIC_WEIGHT"/></td> | </tr> | </xsl:template> | </xsl:stylesheet> `---- |