TODO: CI/CD setup - Schematron; XSpec - xslt3-functions submodule
TODO: PR page with TODO
The underlying processors, Morgana XProc IIIse and Saxon, are tested by their developers and user communities, as well as by this project.
XProc conformance testing is documented for Morgana on its site, using the public XProc 3.0 test suite.
Java is a requirement. For setup instructions, see the README.md, the more detailed setup notes, or try the bash script, ./setup.sh
.
Test the operation of an XProc3 pipeline with the Smoke test pipeline. You should see no figurative smoke:
> ./xp3.sh XPROC3-SMOKETEST.xpl
Windows users with no bash
can use the xp3.bat
utility instead.
In addition to smoketest/POWER-UP.xpl
smoketest/SMOKETEST-XSLT.xpl tests XSLT transformations (requires Saxon installation)
smoketest/SMOKETEST-SCHEMATRON.xpl tests Schematron validation (requires Saxon and SchXSLT installation) - returning SVRL code.
Beginning developers might take the time to inspect and edit this smoke test and the Schematron it uses, as it can show the different behaviors when (a) the document is valid or invalid to the Schematron (as written, all documents are always valid), or (b) the pipeline is set to require validity or not (assert-valid='true'
).
TL/DR is that Schematron errors appear in the main result
port only when the document is required to be valid, and Schematron messages (of any kind) are delivered. A report
output port is available making Schematron results (and runtime metadata) visible in all cases.
Each application will provide its own testing, as described in available README and TESTING documentation.
Additionally, applications that are (for example) testing frameworks, also need to be "self-testing" insofar as their own outputs validate their correctness.
We aim to support XSpec for XSLT unit tests and very much encourage deployment of XSpecs. They are good not only for testing but also to help elucidate what an XSLT does and how it works.
The best way to assess how far we have advanced with this is to examine the file system and CI/CD configuration.
No house rules have been defined or codified yet for XProc, XSLT, XSpec or other formats, but a Schematron is underway to help XProc authors write flawless XProc for this repo. See the testing folder. As documented inline, it enforces a couple of guidelines at WARNING level as well as providing error detection.
In time there may be Schematrons or other tests for XSpecs and other work.
Currently we run no tests under CI/CD but this is also due to change.
Candidate tests include the smoke test and XSpec unit tests just described. The smoke test itself need not be run under CI/CD - until we start running XSpec or other automation under XProc 3.
Additional ideas:
- Schematron the XSpecs for style/usage
- confirm that @name and @type correspond to the file name