On Mar 7, 2007, at 13:50, nickleus wrote:

Hi,

i'm also running fop 0.93 and i get that same error even with the simplest of
fo files that have an fo:root...:
<snip />
running it through fop in linux, ubuntu 6.10:
./fop helloworld.fo helloworld.pdf

gives the following errors:
<snip />
---------

javax.xml.transform.TransformerException:
http://xml.org/sax/handlers/LexicalHandler
   at
org.apache.xalan.transformer.TransformerIdentityImpl.transform (TransformerIdentityImpl.java:501) 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:160)
   at org.apache.fop.cli.Main.main(Main.java:191)
Caused by: org.xml.sax.SAXNotSupportedException:
http://xml.org/sax/handlers/LexicalHandler
   at gnu.xml.stream.SAXParser.setProperty(libgcj.so.70)
   at
org.apache.xalan.transformer.TransformerIdentityImpl.transform (TransformerIdentityImpl.java:475)

It seems that this is an incompatibility issue between the used XSLT processor --Xalan in this case-- and the XML parser. Xalan apparently needs support for the LexicalHandler SAX feature. The URI seems to be slightly off though...

From the org.xml.sax.ext.LexicalHandler API docs:
---
This is an optional extension handler for SAX2 to provide lexical information about an XML document, such as comments and CDATA section boundaries; XML readers are not required to support this handler, and it is not part of the core SAX2 distribution. ...To set the LexicalHandler for an XML reader, use the setProperty method with the propertyId "http://xml.org/sax/properties/lexical- handler". If the reader does not support lexical events, it will throw a SAXNotRecognizedException or a SAXNotSupportedException when you attempt to register the handler.
---

Your options? Either use different XML parser (Xerces instead of the GNU XML parser) or another XSLT processor (Saxon instead of Xalan).


HTH!

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to