Inasmuch as Ant is good at re-running an XSLT transformation or a series of transformations when the XML source changes but not so good at re-running when one of the transformations’ stylesheets’ sub-modules changes, it’s a simple thing to generate on-the-fly a temporary build file containing
paths listing the dependencies of each stylesheet so Ant can do the right thing. Continue reading
Inasmuch as I’d been threatening since the XML Summer School last year to do it, I’ve made a custom Ant task for running XML Calabash, currently only in my fork at email@example.com:MenteaXML/xmlcalabash1.git.
You can use this task to process:
- A single input file to produce a single output file
- A set of input files, processed one at a time, to produce a set of output files
- Multiple input files as the input to one XProc input port processed to produce a single output file
- Any of the above with additional input ports to each of which are applied one or more input files whose file names may be either fixed or mapped from the name(s) of the current main input file(s)
- Any of the above with additional output ports whose file names may be either fixed or mapped from the name(s) of the current main input file(s)
- Any of the above with Ant defaulting to not running the pipeline when the outputs are already up-to-date compared to the inputs and the pipeline
You can also specify options and parameters to be used by the pipeline. Continue reading
Inasmuch as it’s useful, when editing an Ant build file, to have a list of the targets in the file and the ability to jump to any of them, my Ant mode at firstname.lastname@example.org:tkg/ant-mode.git currently only does two things: make a “Ant” menu that lists all the targets and associates a RELAX NG compact syntax schema with build files. Continue reading
Inasmuch as a “feature key” is how you configure a Java JAXP XSLT processor, it’s good to see that Saxon 9.3 has added feature keys for setting the initial template and initial mode. In fact, Saxon has gone from 30 feature keys in Saxon 9.0 to 70 in 9.2 and now 79 in 9.3.
Where this becomes useful (outside of your own Java programs) is being able to specify the initial template and/or mode in the
<xslt> task in Ant build files. Continue reading
Inasmuch as I like to automate processes as much as possible, here’s two Ant targets/macros for automating zipping an EPUB file and checking it with epubcheck: Continue reading
Inasmuch as software has moved on since 2008 when I wrote about When Ant is subsidiary to <oXygen/>, I now run XSpec from <oXygen/> using the Ant bundled with recent <oXygen/>. Continue reading
The <oXygen/> documentation has an example of setting up an “External Tool” to run Ant. The example is simple enough to illustrate its point, but there’s more that can be done, especially if you write the Ant build file knowing that it will be run from <oXygen/>.
This example is from the <oXygen/> “project” that I used for organising the exercises for my “Testing XSLT” tutorial at XTech 2008. Continue reading
Running some JUnit tests with Ant 1.6.5 gave this error when the <junitreport> task ran:
build.xml:160: The following error occurred while executing this line:
build.xml:367: Could not find a valid processor version implementation
I know of two possible solutions: