ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: FAQ and Including XML
Date Wed, 27 Sep 2000 06:38:34 GMT
>>>>> "KM" == Kurt Mahan <kmahan@xmission.com> writes:

 KM> I want to have a build.xml that includes another rules.xml file
 KM> that has most of the targets and such in it.  I'm can't seem to
 KM> find how to do it.

You can do it the XML way 8^):

<!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "file:./ant.dtd" [
   <!ENTITY include SYSTEM "file:./header.xml">
]>

<project ...>
  &include;
...

with a DTD created by <antstructure>. 

You might need to play with the URI syntax, especially for relative
paths. The file:./ way is reported to work, but it might depend on
your XML parser (and the version of Ant).

Going to add this to the FAQ after some testing with Ant 1.1/current
Ant alpha 1.2 as well as Xerces/JAXP reference.

Stefan

Mime
View raw message