Skip to content

Commit

Permalink
Updating readme etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez committed Feb 16, 2024
1 parent 8d7530a commit ad14635
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/schema-gen/InspectorXSLT/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 9 additions & 1 deletion src/schema-gen/InspectorXSLT/testing/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit ad14635

Please sign in to comment.