Dynamic Validation
Click arrow key () to navigate to next page
Run-time Validation
- In the examples considered up till now the XML instance documents were validated against the
Schematron schema using a desktop tool such as Oxygen XML or Topologi.
- In a production environment we need to validate XML instances at run-time (by invoking an API).
Production Environment
1. An XML instance document is sent to a Web Server. 2. The Web Server forwards the document
to some Code. 3. The Code invokes a Schematron Validator with the document, along with the apprpriate Schematron
Schema. 4. The Schematron Validator validatates the document against the Schema, and returns the results to the Code.
Step 1
- Invoke the XSLT processor with your Schematron Schema and the Schematron stylesheet (skeleton1-5.xsl).
- The output is another XSLT stylesheet!
An XSLT processor is invoked, with the Schematron Schema and skeleton1-5.xsl The output is Validation.xsl
Step 2
- Invoke the XSLT processor with your XML instance document and Validator.xsl (the output of Step 1).
- The output is the result from validating your XML instance document against the Schematron Schema!
An XSLT processor is invoked, with the XML instance document and Validation.xsl The output is the validation results.
Summary
An XSLT processor is invoked, with the Schematron Schema and skeleton1-5.xsl The output is sent back into
the XSLT processor, along with the XML instance document. The output is the validation results.
Lab 7
- Rerun your last lab (lab 6), but this time use skeleton1-5.xsl and your favorite XSLT processor to perform the validation.