Quoting the http://xdoclet.sourceforge.net
XDoclet is a code generation engine. It enables Attribute-Oriented Programming for java. In short, this means that you can add more significance to your code by adding meta data (attributes) to your java sources. This is done in special JavaDoc tags.
XDoclet will parse your source files and generate many artifacts such as XML descriptors and/or source code from it. These files are generated from templates that use the information provided in the source code and its JavaDoc tags.
Since XDoclet really evaluates the information in the Java source code to make it available in the XDoclet templates, you cannot use a different language or syntax.
If you want to do some template processing/filtering of text files, you can use Ant's <copy> task which is able to take filters to replace tokens/variables in template files based on Ant properties.