I use oXygen to edit Ant build files and it uses a DTD for the schema. While that works well, the DTD has a few bugs and AFAICT does not support Ant 1.7. So, I wrote a RELAX NG schema for Ant.
The choice between schema languages was easy, RELAX NG has everything I need and is pleasant to write. In addition, oXygen can use the documentation in the schema, so all the better. I used Trang to convert the original DTD to RELAX NG, then just edited the filed manually and occasionally with XSLT.
The code is hosted at GitHub, licensed under GPL. It’s very much a work in progress, but it works for me.