I read somewhere that it is impossible to create a schema for ANT because ANT is not
a sufficiently regular grammar. You can test it for conformance with vanilla XML grammar
if you use Stylus Studio.
You might also feed some of your working scripts into Stylus Studio and ask it to generate an XSD. Then polish the XSD manually. That would not be full ANT, but it might help catch errors.
My way of handling the problem is not to write ANT XML directly, but to generate it with a stomper program. That way it is guaranteed to be correct once I get the program correct.
It is then perfectly consistent across all projects.
see https://wush.net/websvn/mindprod/filedetails.php?repname=mindprod&path=%2Fcom%2Fmindprod%2Fzzz%2FMkAnt.java
for my own stomper code.