ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael.Gir...@objectweb.org
Subject XMLCATALOG question
Date Wed, 14 Jan 2004 16:03:51 GMT

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
"../dtd/my.dtd">

To place XML files into subcatalogs, the SYSTEM path information has to be
modified:
<!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" />
</xmlcatalog>
</style>

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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message