[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: NullPointerException
Yvonne Aburrow wrote: > Hi, my Apache FOP engine keeps throwing a NullPointerException every > time I try to transform an XML file using a particular XSL. (Files are > at <http://people.bath.ac.uk/ccsya/library/> and the offending XSL is > <http://people.bath.ac.uk/ccsya/library/libraryguides.xsl>.) I'm using > Java 1.4.2 and have checked it works with a previous XSL. I tried > validating it with the FO DTD offered by RenderX, but it was no help (it > threw an error at <xsl:stylesheet>). I'm using XMLSpy version 5 rel 4. > > Any help would be much appreciated First, you have to realize that generating PDF from arbitrary XML is a two stage process: first a transformation, which generates a XML document using the XSLFO vocabulary, then the actual formatting of the XSLFO into PDF. You can't validate the style sheet against a FO DTD, only the result of the transformation. In order to track down the problems, run the XSLT standalone and generate an XSLFO document, which can then be validated against the DTD (after you fixed the problems with the style sheet itself Secondly, XMLSpy 5.4 contains an older release of FOP. In particular, the current release 0.20.5 generates more sensible error messages for many of the common problems which caused NPEs. You can get the latest FOP release from http://xml.apache.org/fop/download.html Read http://xml.apache.org/fop/running.html and specifically http://xml.apache.org/fop/running.html#check-input for running FOP without XML Spy. Thirdly, there are more appropriate places to ask for help first: - The Altova help desk - The FOP user list http://xml.apache.org/fop/maillist.html#fop-user for FOP specific problems - The XSL list http://www.mulberrytech.com/xsl/xsl-list/ for general XSL related problems and specifically for XSLT questions. J.Pietschmann
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|