ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Leuschner" <david.leusch...@comnet-solutions.de>
Subject RE: bug-fix for XSLTProcess.java and XalanLiaison.java
Date Thu, 05 Oct 2000 21:33:29 GMT
Hi,

unfortunatelly the fix (I just did a cvs checkout) doesn't work on my
machine (JDK1.3, Win2K). The stylesheet path is still duplicated. The fix I
proposed doesn't work either because it doesn't use the baseDir for relative
paths. I suggest changing the xslFile from java.io.File to java.lang.String
and rewriting the try-catch block at line 144:

try {
	// Create a new XSL processor with the specified stylesheet
	File file = new File(xslFile);
	if(!file.isAbsolute()) file = new File(baseDir, xslFile);
	// don't use xslFile.toString() because it also returns the path
	// and baseDir+path+name contains the baseDir-path and the path supplied as
xslFile
	styleSheetLastModified = file.lastModified();
	log( "Loading stylesheet " + file, Project.MSG_INFO);
	liaison.setStylesheet( file.toString() );
} catch (Exception ex) {
	log("Failed to read stylesheet " + xslFile, Project.MSG_INFO);
	throw new BuildException(ex);
}

By the way I'd recommend using File.toURL() instead of adding "file:". On my
machine it works but why not use the platform-independet method?

Regards

	david


Mime
View raw message