}
long lastMod = oFile.lastModified();
TransformerFactory oFactory;
Templates oTemplates;
StreamSource oStreamSrc;
SheetEntry oSheet = (SheetEntry) oCache.get(sFilePath);
if (null!=oSheet) {
if (DebugFile.trace) {
DebugFile.writeln("Cache hit: Cached stylesheet date "+new Date(oSheet.lastModified).toString() + " Disk file date "+new Date(lastMod).toString());
}
if (lastMod>oSheet.lastModified) {
oSheet = null;
oCache.remove(sFilePath);
}
} // fi (oSheet)
if (null==oSheet) {
if (DebugFile.trace) DebugFile.writeln("TransformerFactory.newInstance()");
oFactory = TransformerFactory.newInstance();
if (DebugFile.trace) DebugFile.writeln("new StreamSource("+sFilePath+")");
oStreamSrc = new StreamSource(sFilePath);
if (DebugFile.trace) DebugFile.writeln("TransformerFactory.newTemplates(StreamSource)");
oTemplates = oFactory.newTemplates(oStreamSrc);
oSheet = new SheetEntry(lastMod, oTemplates);
if (DebugFile.trace) DebugFile.writeln("WeakHashMap.put("+sFilePath+", SheetEntry)");
oCache.put(sFilePath, oSheet);