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

  • Thread starter Ion Chalmers Freeman
  • Start date
I

Ion Chalmers Freeman

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

Tor Iver Wilhelmsen

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.
 
D

Dave Glasser

(e-mail address removed) (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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top