
Test suite for trdoc-data.xsl
Abstract
To be able to update safely the xslt stylesheet to extract data from a pubrules compliant TR doc, this little test suite is provided.
Status
This test suite doesn't assure that changes done to this stylesheet are completely safe, but if the changes are not too big, there is good chance it would be safe.
Feel free to modify this test suite as long as you know what you are doing.
Usage
You need to download (or CVS co for the Team) the following files to use this test suite:
- CR-sample.xhtml, an example of CR head.
- REC-sample.xhtml, an example of REC head, with a slightly different formatting from the previous one, but still pubrules compliant.
- REC-bad-sample.xhtml, an example of a severly broken (pubrules-wise) REC head
- test.xsl, the XSLT stylesheet which imports your version of trdoc-data.xsl (provided it's located as described below) and will allow to compare it to the expected output
- results.orig,results-CR.orig and results-bad.orig, the expected output of the test stylesheet on the documents
- Makefile, the makefile used to actually run the test
They should all be in the same directory. The new version of trdoc-data.xsl to be tested must reside in ../../10/ relatively to the directory where you put the above files.
The following software are needed:
- make
- xt, with java to use it (you should be able to use the xslt online service provided you can hack a script to pass the right arguments and download the results
- diff, to compare the results of your output with the expected ones
- bash (maybe the other shells would work)
Once all is set, type make
and enjoy the results!
Note that when you have updated the trdoc-data.xsl stylesheet or
the samples of TR, you can update the test suite by typing make update
.
Dominique Hazael-Massieux
$Id $