ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kurt Mahan <kma...@xmission.com>
Subject Re: FAQ and Including XML
Date Thu, 28 Sep 2000 06:19:35 GMT
Thanks!

The following worked:

	<?xml version="1.0"?>

	<!DOCTYPE project [
	    <!ENTITY Rules SYSTEM "file:./rules.xml">
	]>

	<project name="TestProject" default="main" basedir=".">

	<!-- ============================================================== -->
	<!-- include the other rules                                        -->
	<!-- ============================================================== -->

	&Rules;

	</project>

Kurt

> >>>>> "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