SAXCSSDocumentHandler always outputs startDocument/endDocument SAX events when
processing a stylesheet. In cases where the stylesheet appears in a larger
document, (SAXCSSDocumentHandler is used as a SAX filter in a pipeline) the
start/end document events are not valid.
For example, when converting the CSS in XHTML document to inline XCSS (I.e.
theoutput is the XHTML and XCSS) the document scope is much larger than the
events output by the SAXCSSDocumentHandler.
This could be implemented using a boolean property like isDocumentFragment
(default false), which is checked in start/endDocument, and the corresponding
SAX events output only if isDocumentFragment is false. (I'm happy to code this
up - just let me know.)