In a large ant build script that is compiling various Java Eclipse-based projects, I am intending to run some xslt transforms against multiple xml files that are in varying project directories.
Paring my code down to the basics, I have this in my build.xml:
<xslt in="path/to/file/myXML.xml" out="new/path/myXML.xml" style="myXSL.xsl"/>
And myXML.xml will define a DTD as follows:
<!DOCTYPE TMSSource SYSTEM "myDTD.dtd">
This results in an error saying it cannot find the dtd file (exact exception is on the build machine, I'll update if I can reproduce it again).
The xml file is looking for the dtd in its own directory (of course). The issue is, the dtd is NOT actually in the same directory, even in the project where the xml lives. Its actually in another project completely. However, for the purposes of the Eclipse environment, the xml is able to resolve the dtd file. I am not sure of the details of how at this point.
So, without modifying the xml file to have the absolute path to the dtd, how can I use ant to resolve the dtd correctly? Is there an attribute of the xslt job that will work? I have tried quite a few, including classpath. Or perhaps some variable I can set in ant itself.
Thanks for the help.
No comments:
Post a Comment