Cocoon+eXist+FOP: back to Ant...
RVDB sent a solution to my Ant build problem, which basically works -- the eXist build.sh is now found -- so I've integrated that, and I've also found a better solution to using Saxon for XSLT, that doesn't depend on its being on the CLASSPATH (which I want to avoid, because its version numbers are likely to change over time). I found the solution in one of the comments on this page, and it's basically this:
- Define a macro for Saxon, specifying a way to call it with the parameters we need to use:
<macrodef name="xslt-saxon"> <attribute name="in"/> <attribute name="out"/> <attribute name="style"/> <sequential> <echo level="info">XSLT Generating @{out}</echo> <java classname="net.sf.saxon.Transform" classpath="${saxon.home}/saxon9he.jar" logError="true" output="@{out}" fork="true"> <arg value="@{in}"/> <arg value="@{style}"/> </java> </sequential> </macrodef>
- Call the macros when required like this:
<xslt-saxon in="${cocoon.home}/build/webapp/WEB-INF/cocoon.xconf" style="cocoon/patch_cocoon_xconf.xsl" out="${cocoon.home}/build/webapp/WEB-INF/cocoon.xconf.patched"> </xslt-saxon>
Now I have RVDB's whole build process working OK, but the resulting webapp is broken; XSLT transformations don't seem to work. I suspect this is something to do with the way Saxon is being set up in the sitemap, because I'm using a more recent version of Saxon (HE, 9.3, as opposed to the three-jar version 9). I'll work on this issue tomorrow.