public Serializer createSerializer()

in src/main/java/org/apache/sling/rewriter/impl/components/AbstractTraxSerializerFactory.java [64:79]


    public Serializer createSerializer() {
        TransformerHandler tHandler = null;
        try {
            tHandler = this.tfactory.newTransformerHandler();
        } catch (TransformerConfigurationException e) {
            logger.error("Unable to create new transformer handler.", e);
        }
        final ContentHandler ch;
        if ( this.needsNamespacesAsAttributes ) {
            final NamespaceAsAttributes nsPipeline = new NamespaceAsAttributes(tHandler, this.logger);
            ch = nsPipeline;
        } else {
            ch = tHandler;
        }
        return new TraxSerializer(tHandler, ch, getOutputFormat(), getDoctypePublic(), getDoctypeSystem());
    }