ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sven.eh...@ubs.com
Subject RE: Re: including other build files
Date Fri, 13 Oct 2000 09:38:21 GMT
many thanks for this ! it works.
the only thing I had to do was removing the <?xml version="1.0"?> in
common.xml. Otherwise one gets a strange error message like "whitespace
required between the version and the enoding".



> How do I include another fragment of a buildfile?
> 
> You can use XML's way of including external files and let the parser
> do the job for Ant:
> 
> <?xml version="1.0"?>
> 
> <!DOCTYPE project [
>     <!ENTITY common SYSTEM "file:./common.xml">
> ]>
> 
> <project name="test" default="test" basedir=".">
> 
>   <target name="setup">
>     ...
>   </target>
> 
>   &common;
> 
>   ...
> 
> </project>
> 
> will literally include the contents of common.xml where you've placed
> the &common; entity.
> 
> In combination with a DTD this would look like this:
> 
> <!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "file:./ant.dtd" [
>    <!ENTITY include SYSTEM "file:./header.xml">
> ]>
> 


Mime
View raw message