conor 2003/09/11 07:41:08
Modified: src/etc/testcases/taskdefs/style testNewerStylesheet.xsl
src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
Log:
Fix new style test so that it pases on Linux. There appeared
to be a clock granularity problem where the output and the stylesheet
both have the same timestamp. I have change the test in XSLTProcess to
run the xslt in this case. Also added a more meaningful message
Revision Changes Path
1.2 +1 -1
ant/src/etc/testcases/taskdefs/style/testNewerStylesheet.xsl
Index: testNewerStylesheet.xsl
===================================================================
RCS file:
/home/cvs/ant/src/etc/testcases/taskdefs/style/testNewerStylesheet.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -u -r1.1 -r1.2
--- testNewerStylesheet.xsl 8 Sep 2003 13:48:10 -0000 1.1
+++ testNewerStylesheet.xsl 11 Sep 2003 14:41:07 -0000 1.2
@@ -3,7 +3,7 @@
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output type="text"/>
+<xsl:output method="text"/>
<xsl:template match="/">
${xsl.value}
1.76 +7 -3
ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Index: XSLTProcess.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -w -u -r1.75 -r1.76
--- XSLTProcess.java 10 Sep 2003 15:18:40 -0000 1.75
+++ XSLTProcess.java 11 Sep 2003 14:41:07 -0000 1.76
@@ -523,13 +523,17 @@
Project.MSG_DEBUG);
log("Style file " + xslFile + " time: " + styleSheetLastModified,
Project.MSG_DEBUG);
- if (force || inFile.lastModified() > outFile.lastModified()
- || styleSheetLastModified > outFile.lastModified()) {
+ if (force || inFile.lastModified() >= outFile.lastModified()
+ || styleSheetLastModified >= outFile.lastModified()) {
ensureDirectoryFor(outFile);
log("Processing " + inFile + " to " + outFile,
Project.MSG_INFO);
configureLiaison(stylesheet);
liaison.transform(inFile, outFile);
+ } else {
+ log("Skipping input file " + inFile
+ + " because it is older than output file " + outFile
+ + " and so is the stylesheet " + stylesheet,
Project.MSG_DEBUG);
}
} catch (Exception ex) {
log("Failed to process " + inFile, Project.MSG_INFO);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]