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

void org::osjava::jardiff::ant::JDTraXLiaison::readTemplates (  )  throws IOException, TransformerConfigurationException, ParserConfigurationException, SAXException [inline, private]

Read in templates from the stylesheet

Definition at line 251 of file JDTraXLiaison.java.

References getFactory(), getSource(), stylesheet, systemid, templates, and templatesModTime.

Referenced by createTransformer().

                                                          {

        // Use a stream so that you can close it yourself quickly
        // and avoid keeping the handle until the object is garbaged.
        // (always keep control), otherwise you won't be able to delete
        // the file quickly on windows.
        InputStream xslStream = null;
        try {
            // JARDIFF: Largely modified.
            if(stylesheet != null) {
                xslStream
                    = new BufferedInputStream(new FileInputStream(stylesheet));
                templatesModTime = stylesheet.lastModified();
            } else {
                xslStream = 
                    new URL(systemid).openStream();
                templatesModTime = 0L;
            }
            Source src = getSource(xslStream, systemid);
            templates = getFactory().newTemplates(src);
        } finally {
            if(xslStream != null) {
                xslStream.close();
            }
        }
    }


Generated by  Doxygen 1.6.0   Back to index