Ant driver
<project name="xcrete" default="test" basedir=".">
<target name="generate">
<xslt style="xcrete_make_tests.xsl"
in="test_definition.xml"
out="xslt_unit_test.xsl"/>
</target>
<target name="test" depends="generate">
<xslt style="xslt_unit_test.xsl"
in="test_data.xml"
out="test_results.xml"/>
</target>
</project>
First we generate the XSLTUnit stylesheet, then we run the tests.
Hmm. Then we have to pick through the results XML by hand. Also this isn't really going to scale very well.
Back at the beginning, I said that XSLT processing was probably only part of the system. It's not the whole picture. The rest, in this case, is in Java. Let's hope we're all good agile developers with lots of JUnit tests to exercise that code base. It would be kind of cool and pretty useful if we could integrate our XSLT tests with those JUnit tests into one ubertestsuite.
If we can make our XSLT tests look like a JUnit test suite, then Ant (or whatever our runner is) will do the necessary magic for us.
What does a JUnit test case look like?