Schematron Overview

Roger Costello

Click arrow key () to navigate to next page

Validation

Schematron schema and an XML instance document are sent into a Schematron validator, which validates the instance document against the Schematron schema.

Validators

Schematron Schema

  1. <?xml version="1.0"?>
  2. <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
  3. ...
  4. </sch:schema>

Patterns

  1. <?xml version="1.0"?>
  2. <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
  3. <sch:pattern name="..."> ... </sch:pattern>
  4. <sch:pattern name="..."> ... </sch:pattern>
  5. <sch:pattern name="..."> ... </sch:pattern>
  6. </sch:schema>

Rules

  1. <sch:pattern name="...">
  2. <sch:rule context="..."> ... </sch:rule>
  3. <sch:rule context="..."> ... </sch:rule>
  4. <sch:rule context="..."> ... </sch:rule>
  5. </sch:pattern>

Assertion

  1. <sch:rule context="...">
  2. <sch:assert test="XPath">
  3. ... text description ...
  4. </sch:assert>
  5. <sch:assert test="XPath">
  6. ... text description ...
  7. </sch:assert>
  8. </sch:rule>

Assertion (cont.)

  1. <sch:assert test="XPath">
  2. ... text description ...
  3. </sch:assert>

Validator Operation

Homepage