ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: "include" equivalent in ant?
Date Mon, 11 Dec 2000 15:52:01 GMT
Jason Rosenberg wrote (about XML Inclusions):
> Steve,
> Can you give an example of how this might work?  Are any parsers
> yet recognizing this syntax?  I have been trying to include some basic
> things within an ant build.xml file, but can't seem to get it to behave
> as desired.
> Are there any more explanatory web-sites describing the usage
> of this feature, as opposed to just the official spec, which is
> a bit difficult to follow?
> I am using the xml parser jar files that came with Ant 1.2.

I don't know of an implementation yet; I was thinking of Ant 2.0
planning rather than solving your immediate problem.  The XInclude stuff
is still in draft and could change and/or take a while before it is

You might think of making a preprocessor, though, which recognizes
something like
	<xinclude:include href="sub-ant.xml"/>

placed in arbitrary places in your build.xml, and resolves the href
prior to feeding the build file to Ant.  It would be easy to implement
this in XSL, for example.  Of course, how suitable this is to your task
depends on your environment and could depend on other things, too.


View raw message