<keshlam <at> us.ibm.com> writes: > > > MeteoMediaForecastTransform.class.getResourceAsStream("/xsl/my.xsl"))); > The value is a URI. If you want it to be interpreted > as an absolute URI, it must include a URI Scheme. Since you want to write > to the filesystem, use the file: scheme... and if this is a Microsoft > operating > sytem, probably a drive letter as well: > "file:///C:/xsl/my.xsl" > >
Thanks for the reply. I tried a few variations and the culprit seems to be the following: transformer.setParameter("outputDir",outputDirectory); transformer.transform(new StreamSource(inputFile), new StreamResult(System.out)); I am on a Windows machined and if I specify the output directory as "C:/foo" it writes to the correct location, however, if I set it simply to "/foo" it writes it in the location relative to the input file. The problem is that the redirect:write parameter accepts a file, not a URI as a parameter. When I specify c:/ on a Windows system, it will force the write to the proper location, but in the end the application will be running on a Unix (Linux?) system. The root file system will be specified as "/" which will probably exhibit the same problems (I can't confirm for sure because I don't have a machine to test with available). When I run the application outside of a container (tomcat in my case, but eventually WAS) I don't see this behaviour. The "/" is interpreted correctly as the root of the current file system. So I think I'm still stuck. L