Class ExpandedTitleContentHandler

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

    public class ExpandedTitleContentHandler
    extends ContentHandlerDecorator
    Content handler decorator which wraps a TransformerHandler in order to allow the TITLE tag to render as <title></title> rather than <title/> which is accomplished by calling the ContentHandler.characters(char[], int, int) method with a length of 1 but a zero length char array.

    This workaround is an unfortunate circumstance of the limitations imposed by the implementation of the XML serialization code in the JDK brought over from the xalan project which no longer allows for the specification of an alternate content-handler via xslt templates or other means.

    See Also:
    TIKA-725