Schematron Pretty

     Pattern           

The Closed Schematron DTD

     Rule   
schema
     Assert   
count(*) = count(pattern)A schema element should contain only pattern elements.
     Assert   
patternA schema element should contain at least one pattern element.
     Rule   
pattern
     Assert   
count(*) = count(rule)A pattern element should contain only rule elements.
     Assert   
ruleA pattern element should contain at least one rule elements.
     Assert   
@nameA pattern element should have an attribute called name.
     Rule   
rule
     Assert   
count(*) = count(assert | report) A rule elemement should contain only assert and report elements.
     Assert   
assert | report A rule elemement should contain at least one assert or report elements.
     Assert   
@contextA rule element should have an attribute called context. This should be an XPath for selecting nodes to make assertions and reports about.
     Rule   
assert
     Assert   
@testAn assert element should have an attribute called test. This should be an XSLT expression.
     Rule   
report
     Assert   
@testA report element should have an attribute called test. This should be an XSLT expression.



     Pattern           

The Schematron Extras

     Rule   
pattern
     Assert   
parent::schemaA pattern element should be within a schema element.
     Assert   
string-length(@name) > 0A pattern element's name attribute should contain some text.
     Report   
count(rule) > 4000Warning: This implementation of The Schematron only allows 4000 rules per pattern. Split the current pattern into two.
     Rule   
rule
     Assert   
parent::patternA pattern element should be within a schema element.
     Assert   
string-length(@context) > 0A rule element's context attribute should contain an XPath.
     Rule   
assert
     Assert   
parent::ruleAn assert element should be within a rule element.
     Assert   
string-length(@test) > 0An assert element's test attribute should contain an XPath expression.
     Assert   
string-length(text()) > 0An assert element should contain some explanatory text.
     Rule   
report
     Assert   
parent::ruleA report element should be within a rule element.
     Assert   
string-length(@test) > 0A report element's test attribute should contain an XPath expression.
     Assert   
string-length(text()) > 0A report element should contain some explanatory text.



     Pattern           

Miscellanous examples of useful things

     Rule   
schema
     Report   
ancestor::schemaA schema cannot contain a schema
     Rule   
rule[@context="html"]
     Report   
*This schema seems to be for HTML.




Schematron Pretty by Rick Jelliffe. The Schematron by Rick Jelliffe, Academia Sinica Computing Centre.