
Extend Ant to support XML inclusions formulated according to the XInclude standard.
- Download the JAR archive
- Download Elliotte's XInclude implementation
- Add the following JAR archives to Ant's classpath:
jdom-1.0b9rc.jar
xercesImpl-2.0.2.jar
xia.jar
xincluder.jar
xmlParserAPIs-2.0.2.jar
- Add to following line to your Ant buildfile to create the include task
<taskdef name="include" classname="de.jeckle.AntExtension.XIncludeTask"/>
- Installation finished!
Now you can define your own include tasks.
- Define a new Ant task (e.g. named include).
- Use the new task whereas the
file
attributes names the input file containing XInclude elements according to the specification.
The file produced is identified by the tofile
attribute.
 | Attribute | Description | Required |
---|
 | file | XML input file containing XInclude elements | Yes | tofile | XML output file | Yes |
|
<project
name="myProject"
default="all"
basedir=".">
<taskdef name="include" classname="de.jeckle.AntExtension.XIncludeTask"/>
...
<target name="myTarget1">
...
<include
file="sourceContainingXIncludeStatements"
tofile="resultFile"/>
...
</target>
...
</project>
Download this example code
The implementation is released unter the Lesser GNU Public License.
The used XInclude implementation contains two JAR files from the Apache XML Project (i.e. xercesImpl-2.0.2.jar and xmlParserAPIs-2.0.2.jar),
and one JAR file from the JDOM Project (jdom-1.0b9rc.jar).
- Java J2SE v1.4.1_02
- xincluder-1.0d11.tar.gz
- Ant v1.5.2 (2003-02-28)

Service provided by Mario Jeckle
Generated: 2004-06-11T07:12:31+01:00
Feedback
SiteMap
This page's original location: http://www.jeckle.de/freeStuff/xia/index.html
RDF description for this page