Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Schema for build.xml in Ant: Is there one?

135 views
Skip to first unread message

Ion Chalmers Freeman

unread,
Oct 1, 2004, 8:18:34 PM10/1/04
to
I'm trying to use Ant, and I don't see a schema for build.xml. Is it
defined anywhere?
Thanks!
ion

Tor Iver Wilhelmsen

unread,
Oct 2, 2004, 4:15:53 AM10/2/04
to
ionFr...@gmail.com (Ion Chalmers Freeman) writes:

> I'm trying to use Ant, and I don't see a schema for build.xml. Is it
> defined anywhere?

No.

To quote
http://phd.netcomp.monash.edu.au/RobertMarkBram/notes/ant/tutorial/default.asp:

"Ant build files must be well formed XML documents. However, there
are no formal DTD's or XML Schemas for Ant build files. Ant doesn't
have DTD's or XML Schemas essentially because the rules for a valid
Ant build file can change so easily. For example, Ant allows you to
create your own types of XML elements and use them in your build
files - which would immediately make your build file invalid
according to the 'standard' DTD or XML Schema."

So the reason is that ant is a collection of custom rules, with ant
tasks (new tags) "plugged in" as needed. It would be hell if every
task was another namespace, which would be the consequence of
requiring a schema or DTD.

Dave Glasser

unread,
Oct 2, 2004, 10:34:01 AM10/2/04
to
ionFr...@gmail.com (Ion Chalmers Freeman) wrote on 1 Oct 2004
17:18:34 -0700 in comp.lang.java.programmer:

>I'm trying to use Ant, and I don't see a schema for build.xml. Is it
>defined anywhere?


You can generate a DTD for a build.xml file with the antstructure
task:

<target name="dtd">
<antstructure output="project.dtd"/>
</target>


--
Check out QueryForm, a free, open source, Java/Swing-based
front end for relational databases.

http://qform.sourceforge.net

If you're a musician, check out RPitch Relative Pitch
Ear Training Software.

http://rpitch.sourceforge.net

ion

unread,
Jan 7, 2005, 11:45:55 AM1/7/05
to
Well, that's ... interesting. Thanks!

0 new messages