You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2007/10/16 12:51:01 UTC
svn commit: r585108 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Author: stevel
Date: Tue Oct 16 03:50:59 2007
New Revision: 585108
URL: http://svn.apache.org/viewvc?rev=585108&view=rev
Log:
Bug ID 43635 <xslt> task can't be used more than once with a file stylesheet
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java?rev=585108&r1=585107&r2=585108&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java Tue Oct 16 03:50:59 2007
@@ -35,6 +35,7 @@
import org.apache.tools.ant.types.resources.FileResource;
import org.apache.tools.ant.types.resources.Resources;
import org.apache.tools.ant.types.resources.Union;
+import org.apache.tools.ant.types.resources.FileProvider;
import org.apache.tools.ant.util.FileNameMapper;
import org.apache.tools.ant.util.FileUtils;
@@ -285,8 +286,9 @@
throw new BuildException("input file " + inFile + " does not exist", getLocation());
}
try {
+ Resource styleResource;
if (baseDir == null) {
- baseDir = getProject().resolveFile(".");
+ baseDir = getProject().getBaseDir();
}
liaison = getLiaison();
@@ -315,11 +317,13 @@
FileResource fr = new FileResource();
fr.setProject(getProject());
fr.setFile(stylesheet);
- xslResource = fr;
+ styleResource = fr;
+ } else {
+ styleResource = xslResource;
}
// if we have an in file and out then process them
if (inFile != null && outFile != null) {
- process(inFile, outFile, xslResource);
+ process(inFile, outFile, styleResource);
return;
}
/*
@@ -337,7 +341,7 @@
// Process all the files marked for styling
list = scanner.getIncludedFiles();
for (int i = 0; i < list.length; ++i) {
- process(baseDir, list[i], destDir, xslResource);
+ process(baseDir, list[i], destDir, styleResource);
}
if (performDirectoryScan) {
// Process all the directories marked for styling
@@ -346,7 +350,7 @@
list = new File(baseDir, dirs[j]).list();
for (int i = 0; i < list.length; ++i) {
process(baseDir, dirs[j] + File.separator + list[i], destDir,
- xslResource);
+ styleResource);
}
}
}
@@ -355,7 +359,7 @@
throw new BuildException("no resources specified");
}
}
- processResources(xslResource);
+ processResources(styleResource);
} finally {
if (loader != null) {
loader.resetThreadContextLoader();
@@ -575,6 +579,7 @@
/**
* Styles all existing resources.
*
+ * @param stylesheet style sheet to use
* @since Ant 1.7
*/
private void processResources(Resource stylesheet) {
@@ -983,8 +988,8 @@
// If we are here we cannot set the stylesheet as
// a resource, but we can set it as a file. So,
// we make an attempt to get it as a file
- if (stylesheet instanceof FileResource) {
- liaison.setStylesheet(((FileResource) stylesheet).getFile());
+ if (stylesheet instanceof FileProvider) {
+ liaison.setStylesheet(((FileProvider) stylesheet).getFile());
} else {
throw new BuildException(liaison.getClass().toString()
+ " accepts the stylesheet only as a file", getLocation());
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r585108 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Posted by Bruce Atherton <br...@callenish.com>.
The changes for svn version 1.5 are for tracking of merges so that you
don't accidentally merge the same changes twice to the same place, which
I don't think is the issue here.
Subversion has had good merge support between branches since the first
release. See http://svnbook.red-bean.com/en/1.0/ch04s03.html
Kevin Jackson wrote:
>> Tell me how to merge stuff in SVN and I will try!
>>
>
> I just copied'n'pasted :( apparently svn 1.5 will have easier merging
> than currently[1]
>
> http://blog.red-bean.com/sussman/?p=79
>
> I've been playing with git recently and I'm very very impressed by
> it's performance - cloning the entire linux kernel source is very fast
> considering my network connection vs the size of the source tree.
> Performing a checkout of a project using svn is less stellar :(
>
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
Re: svn commit: r585108 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Posted by Martijn Kruithof <jm...@kruithof.xs4all.nl>.
Kevin Jackson schreef:
>> Tell me how to merge stuff in SVN and I will try!
>>
>
> I just copied'n'pasted :( apparently svn 1.5 will have easier merging
> than currently[1]
>
> http://blog.red-bean.com/sussman/?p=79
>
> I've been playing with git recently and I'm very very impressed by
> it's performance - cloning the entire linux kernel source is very fast
> considering my network connection vs the size of the source tree.
> Performing a checkout of a project using svn is less stellar :(
>
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
I am merging using eclipse merge option on svn (with the subversion plugin)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r585108 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Posted by Kevin Jackson <fo...@gmail.com>.
> Tell me how to merge stuff in SVN and I will try!
I just copied'n'pasted :( apparently svn 1.5 will have easier merging
than currently[1]
http://blog.red-bean.com/sussman/?p=79
I've been playing with git recently and I'm very very impressed by
it's performance - cloning the entire linux kernel source is very fast
considering my network connection vs the size of the source tree.
Performing a checkout of a project using svn is less stellar :(
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r585108 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Posted by Steve Loughran <st...@apache.org>.
Stefan Bodewig wrote:
> On Tue, 16 Oct 2007, <st...@apache.org> wrote:
>
>> URL: http://svn.apache.org/viewvc?rev=585108&view=rev Log:
>> Bug ID 43635 <xslt> task can't be used more than once with a file
>> stylesheet
>
> Do you intend to merge it into the 1.7 branch?
>
Tell me how to merge stuff in SVN and I will try!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r585108 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 16 Oct 2007, <st...@apache.org> wrote:
> URL: http://svn.apache.org/viewvc?rev=585108&view=rev Log:
> Bug ID 43635 <xslt> task can't be used more than once with a file
> stylesheet
Do you intend to merge it into the 1.7 branch?
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org