ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <>
Subject Re: XMLCATALOG question
Date Wed, 14 Jan 2004 17:32:22 GMT wrote:

>I'm using ANT 1.6 and not sure if I have found a bug in ANT <style>
>processing, or if I have an error in my use of the feature.  I've searched
>the archive, but do not see anything that helps.
>JDK: Sun J2SE 1.4.2_03
>ANT: 1.6
>CLASSPATH: not defined prior to invoking ANT
>OS: Windows XP Pro
>I have a collection of XML documents that contain <!DOCTYPE xxx SYSTEM
>To place XML files into subcatalogs, the SYSTEM path information has to be
><!DOCTYPE xxx SYSTEM "../dtd/my.dtd"> for first level catalog
><!DOCTYPE xxx SYSTEM "../../dtd/my.dtd"> for second level catalog, ...
>I thought I could clean this up by using xmlcatalog to resolve the dtd to a
>fixed location as:
><!DOCTYPE xxx PUBLIC "-//my//xxx//EN" "my.dtd">
><!-- note relative path is same in all documents regardless of directory
>Then in the build.xml:
><style ...>
> <xmlcatalog>
> <dtd publicId="-//my//xxx/EN" location="${dtd.dir}/my.dtd" />
>When ANT runs this task, I get errors indicating that my.dtd is not found.
>The path that is displayed for the file not found error is always qualified
>with the directory of the xml file.  The <style> task is resolving the
>system path information from the DOCTYPE tag and not using the xmlcatalog.
>NOTE -- the exact same xmlcatalog is working within an xmlvalidate task in
>the same build.xml file.
>Michael Giroux
>To unsubscribe, e-mail:
>For additional commands, e-mail:
Hi Michael,
not sure if this helps a lot, but just before ant 1.6.0 was released I 
fixed a similar bug :
maybe if you have a look at the bug report it will give you some idea.
It is quite possible that there is still something wrong in this area.

As a workaround :
make sure that dtd.dir is an absolute path, maybe define dtd.dir like this :
<property name="dtd.dir" 
then ant will automatically store under ${dtd.dir} the absolute path and 
it might work better.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message