Extend the test definition
<xc:tests name="styletest"
xmlns:xc="http://www.jezuk.co.uk/xcrete/test-def">
<xc:xslt href="style.xsl"/>
<xc:xml href="test-data.xml"/>
<xc:test id="test_title">
<xc:apply-templates select="/document/chapter[1]/heading"/>
<xc:expected>
<big><strong>w</strong>oo!</big>
</xc:expected>
</xc:test>
...
</xc:stylesheet>
First, let's extend the test definition to point to the test data.
This is probably a good idea anyway.
OK. Now let's hack on the generator.
At the moment, we make one pass which generates the XSLTUnit stylesheet.
We can make another pass which generates the Java source. Now, obviously Java source isn't XML, but that's ok because XSLT can generate text output too. It's not so common, but it's entirely fine.