Class SerializingContentHandler

  • All Implemented Interfaces:
    ContentHandler, DTDHandler, EntityResolver, ErrorHandler

    public class SerializingContentHandler
    extends DefaultContentHandler
    A ContentHandler that serializes SAX events to a given Result instance. The JAXP SAXTransformerFactory facility is used for the serialization.

    This class explicitly ensures that all namespace prefixes are also present as xmlns attributes in the serialized XML document. This avoids problems with Xalan's serialization behaviour which was (at least during JDK 1.4) to ignore namespaces if they were not present as xmlns attributes.

    NOTE: The code in this class was originally written for Apache Cocoon and is included with some modifications here in Apache Jackrabbit. See the org.apache.cocoon.serialization.AbstractTextSerializer class in the cocoon-pipeline-impl component for the original code.

    Jackrabbit JCR Commons 1.5