#584 startDocument() called twice on SAXResult

v8.8
closed
Michael Kay
5
2012-10-08
2006-09-13
Michael Kay
No

When the destination of a transformation is a
SAXResult, it is possible for the startDocument() event
on the ContentHandler to be invoked more than once.
Many ContentHandler implementations will tolerate this,
but it is incorrect, and some may fail. For example,
Saxon's own TransformerHandlerImpl class (which
implements the JAXP TransformerHandler) will fail with
an UnsupportedOperationException if startDocument() is
called twice. This happens, for example, if the output
of a Saxon IdentityTransformer is sent to a
TransformerHandler.

The fix (in Subversion) is to module
net.sf.saxon.event.SerializerFactory

Discussion