Is there a simple preprocessor / code generator like GNU M4 that can be called from Ant?
I need to keep the old XSL code and I found that there is a lot of duplication in the XSL files. It seems like there is no lightweight include / import function for XSL that would allow me to move the code to another file and just include it when needed.
It sounds like it can be done with Model Driven Development tools, but I've only heard about it, not used it, and it's probably too big to work.
Is there a simple preprocessor that can be called from Ant that includes / import support?
a source to share
There is an XSL inclusion mechanism. See http://www.w3.org/TR/xslt#section-Combining-Stylesheets for details .
If you can't achieve what you want, you can preprocess the XSL with another XSL transformation: XSL is just XML. But ... I don't think the programmers who will support your project after you leave will thank you for it!
If you just need a cross-platform replacement for M4, you can call Velocity , Freemarker, or another template library from Ant.
a source to share