Logo Search packages:      
Sourcecode: jaxe version File versions  Download package

Document jaxe::Config::transformationConfig ( final Document  docCfg  )  [inline, private]

Transformation XSLT depuis l'ancienne version des fichiers de config, avec conversion_config.xsl

Definition at line 268 of file Config.java.

References LOG.

                                                                 {
        if ("CONFIG_JAXE".equals(docCfg.getDocumentElement().getNodeName())) {
            ancienneConfig = false;
            return(docCfg);
        }
        ancienneConfig = true;
        try {
            final TransformerFactory tFactory = TransformerFactory.newInstance();
            URL urlConversionXSL;
            if (cfgdir == null)
                urlConversionXSL = new URL("conversion_config.xsl");
            else
                urlConversionXSL = new URL(cfgdir.toExternalForm() + "/" + "conversion_config.xsl");
            final InputStream xslStream = urlConversionXSL.openStream();
            final Transformer transformer = tFactory.newTransformer(new StreamSource(xslStream));
            final DOMSource source = new DOMSource(docCfg);
            final DOMResult result = new DOMResult();
            transformer.transform(source, result);
            return((Document)result.getNode());
        } catch (final Exception ex) {
            LOG.error("Config.transformationConfig: " + ex.getMessage(), ex);
            return(null);
        }
    }


Generated by  Doxygen 1.6.0   Back to index