Recently we've come under pressure to introduce significantly more complexity into transformations, both to produce ePub (which is wrapped HTML bundled with media and metadata files) and HTML5 (which can represent more of the formal semantics in TEI). The software engineer in me sees unit testing the a way to reduce our errors while opening development up to a larger more diverse group of people with a larger more diverse set of features they want to see implemented.
The problem is, that I can't seem to find a decent unit testing framework for XSLT. Does anyone know of one?
Our requirements are: XSLT 2.0; free to use; runnable on our ubuntu build server; testing the transformation with multiple arguments; etc;
We're already using: XSD, RNG, DTD and schematron schemas, epubcheck, xmllint, standard HTML validators, etc. Having the framework drive these too would be useful.
The kinds of things we want to test include:
- Footnotes appear once and only once
- Footnotes are referenced in the text and there's a back link from the footnote to the appropriate point in the text
- Internal references (tables of contents, indexes, etc) point somewhere
- Language encoding used xml:lang survives from the TEI to the HTML
- That all the paragraphs in the TEI appear at least once in the HTML
- That local links work
- Sanity check tables
- Internal links within parallel texts