ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Kelly" <ke...@ad1440.net>
Subject XSLTProcess task can't find XSL file
Date Mon, 29 Jan 2001 02:30:26 GMT
The <style> task, served by the XSLTProcess task, says
that the basedir attribute is used to find the source
XML files ... if only that was the extent of how that
attribute worked.

The basedir attribute is also used (incorrectly, in my
opinion) to find the XSL file.  This forces users to put
their XSL file under the same directory tree as their
XML files.  This is particularly annoying when the XML
files are automatically generated.

Worse, I can't even give an absolute path to the XSL
file to get around this problem, since version 1.13,
line 157 of XSLTProcess.java unconditionally does:

    File file = new File( baseDir, xslFile.toString() );

meaning the baseDir is *always* preprended to the
xslFile path.  My (yucky) workaround:

    style="../../../../../wherever/theFile.xsl"

Keith, Sam, Russell: any chance you can change the
behavior?  Maybe check if xsfFile is already an absolute
path and leave it alone if it is, otherwise do the
little baseDir trick?  Or update the documentation?

And how about specifying the XSL file by system ID?

Thanks.
--k





Mime
View raw message