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

void org::osjava::jardiff::ant::JDTraXLiaison::createTransformer (  )  throws Exception [inline, private]

Create a new transformer based on the liaison settings

Returns:
the newly created and configured transformer.
Exceptions:
Exception thrown if there is an error during creation.
See also:
setStylesheet(java.io.File)

addParam(java.lang.String, java.lang.String)

setOutputProperty(java.lang.String, java.lang.String)

Definition at line 288 of file JDTraXLiaison.java.

References outputProperties, params, readTemplates(), templates, transformer, and uriResolver.

                                                      {
        if (templates == null) {
            readTemplates();
        }

        transformer = templates.newTransformer();

        // configure the transformer...
        transformer.setErrorListener(this);
        if (uriResolver != null) {
            transformer.setURIResolver(uriResolver);
        }
        for (int i = 0; i < params.size(); i++) {
            final String[] pair = (String[]) params.elementAt(i);
            transformer.setParameter(pair[0], pair[1]);
        }
        for (int i = 0; i < outputProperties.size(); i++) {
            final String[] pair = (String[]) outputProperties.elementAt(i);
            transformer.setOutputProperty(pair[0], pair[1]);
        }
    }


Generated by  Doxygen 1.6.0   Back to index