![]() |
|
|
|||||||
![]() |
Java - Schema for build.xml in Ant: Is there one? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I'm trying to use Ant, and I don't see a schema for build.xml. Is it
defined anywhere? Thanks! ion Ion Chalmers Freeman |
|
|
|
|
#2 |
|
Posts: n/a
|
(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/Rob...l/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. Tor Iver Wilhelmsen |
|
|
|
#3 |
|
Posts: n/a
|
(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 Dave Glasser |
|
|
|
#4 |
|
Posts: n/a
|
Well, that's ... interesting. Thanks!
ion |
|