ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: "include" equivalent in ant?
Date Wed, 29 Nov 2000 15:23:51 GMT
Jason Rosenberg <jason@squaretrade.com> wrote:

> Can someone explain how this works?  My XML book doesn't
> seem to cover any syntax anything like this:

its coming right there from SGML. If your book covers DTDs and
internal entity sets, search there.

> 
> --- cut ---
> <?xml version="1.0"?>
> 
> <!DOCTYPE project [

should be clear, yes?

>   <!ENTITY buildFW SYSTEM "buildFW.inc">

define a new entity named buildFW (entities are these &foo; things
like &gt; - &gt; derefences the entity gt). Wherever you put &buildFW;
in your XML file it is going to be replaced by the content of the file
"buildFW.inc".

>   <!ENTITY buildHO SYSTEM "buildHO.inc">

Same

> %buildFW;
> %buildHO;

doesn't make any sense here, you can simply remove it.

> ]>

close the doctype definition.

> 
>   <target name="performBuild">
>     &buildFW;

insert the content of buildFW.inc. In this example it probably holds
tasks, something like

<depend srcdir="${src}" ...>
<javac srcdir="${src}" ...>

and so on.

What is important to note here is that the content is included at
parser time, to Ant it looks exactly the same as if you had pasted the
content there. The XML Parser is performing the include, not Ant.

Stefan

Mime
View raw message