protected void activate()

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


    protected void activate(final ComponentContext ctx) {
        this.tfactory = (SAXTransformerFactory) TransformerFactory.newInstance();
        tfactory.setErrorListener(new TraxErrorHandler(this.logger));
        // Check if we need namespace as attributes.
        try {
            this.needsNamespacesAsAttributes = this.needsNamespacesAsAttributes();
        } catch (Exception e) {
            this.logger.warn("Cannot know if transformer needs namespaces attributes - assuming NO.", e);
            this.needsNamespacesAsAttributes = false;
        }
    }