From ad14635f5435a8ed777b452ae9fb7447e3dadd19 Mon Sep 17 00:00:00 2001 From: Wendell Piez Date: Fri, 16 Feb 2024 16:02:55 -0500 Subject: [PATCH] Updating readme etc. --- src/schema-gen/InspectorXSLT/TESTING.md | 8 ++++++++ src/schema-gen/InspectorXSLT/testing/readme.md | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/schema-gen/InspectorXSLT/TESTING.md b/src/schema-gen/InspectorXSLT/TESTING.md index 15a12810..0bd1fd4e 100644 --- a/src/schema-gen/InspectorXSLT/TESTING.md +++ b/src/schema-gen/InspectorXSLT/TESTING.md @@ -70,6 +70,14 @@ This XSD should validate the same set of rules as the Inspector (excluding Metas A copy of the current-best schema is also here, to be refreshed as necessary): [testing/current/computer_metaschema-xmlschema.xsd](testing/current/computer_metaschema-xmlschema.xsd) +#### XSD Validate the Samples + +A bash script `testing/xsd-crosscheck-samples.sh` executes an XProc pipeline that performs batch 'go/no-go' validation of XML sources expected to be either valid, or invalid, to the computer_metaschema model, as found in the `testing` folder. + +It will report on the command line whether any files expected to be valid (based on their placement in the `computer-valid` folder) are not valid, or any files expected not to be valid (because in the `computer-invalid` folder) are found actually to be valid. + +The validating parser used is the Java built-in parser, Xerces, as instrumented in XML Calabash (using `p:validate-with-xml-schema`). + ### Refresh the 'computer model' Inspector XSLT Before testing the Computer Inspector XSLT, the copy kept for testing must be refreshed. diff --git a/src/schema-gen/InspectorXSLT/testing/readme.md b/src/schema-gen/InspectorXSLT/testing/readme.md index 0d2ca505..cc5de9b9 100644 --- a/src/schema-gen/InspectorXSLT/testing/readme.md +++ b/src/schema-gen/InspectorXSLT/testing/readme.md @@ -26,10 +26,18 @@ Some [known-valid](valid/) and [known-invalid](invalid/) instances are also prov Additionally, `tiny_metaschema.xml` is a small metaschema made specifically for trying and testing the markup datatypes. +### XSD validations of computer samples + +This can be done with a script in batch, respecting the organization of examples that should be found valid or invalid, as indicated by their file location. + +The script is `xsd-crosscheck-samples.sh`, which invokes XProc pipeline `XSD-VALIDATE-COMPUTER-SAMPLES.xpl`. + +See [InpspectorXSLT/TESTING.md](../TESTING.md) for more information. + ### XSpec demonstrating correctness of the Inspector An Inspector can be generated from a metaschema such as `computer_model.xml` and tested against known inputs to demonstrate that the tests performed by the Inspector bring the correct results. Exercising these tests, a number of XSpec files in this folder calling `current/computer_metaschema-inspector.xsl` should all complete successfully and report "all green" -- no warnings, no errors, no unexpected 'pending' sections. -See the [TESTING](../TESTING.md) docs for more information. +Again, see the [TESTING](../TESTING.md) docs for more information.