xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kay Michael <Michael....@icl.com>
Subject Problems with FOP ContentHandler interface (at fop 0_14_0)
Date Fri, 06 Oct 2000 13:13:58 GMT
I've been upgrading Saxon to drive FOP 14; I see that the FOTreeBuilder
interface is now a SAX2 ContentHandler rather than a SAX1 DocumentHandler.
With the current releases of Saxon and FOP, the integration is broken.

I'm calling startPrefixMapping() to define the namespace declarations but
the code ignores these calls. It also seems to do nothing with the prefix
and uri passed on the startElement() call. Instead, it seems to expect
namespace declarations to be represented as xmlns:xx attributes.

The SAX2 specification for ContentHandler says: <quote>The attribute list
will contain attributes used for Namespace declarations (xmlns* attributes)
only if the http://xml.org/sax/features/namespace-prefixes property is true
(it is false by default, and support for a true value is optional).</quote>

Since I'm not a parser, FOP has no opportunity to set this property, so I
behave in the default way, and don't include namespace declarations in the
attribute list. The result is that FOP complains that "fo" is an undeclared

Secondary problem: after startElement() bombs out with this error, my
clear-up path (foolishly) calls format(). This hits a NullPointerException
referencing rootFObj, masking all diagnostics for the real error. Since
format() is a public interface, it should probably be resilient to this

Mike Kay

View raw message