Schematron 1.5 Conformance Language (draft)

Rick Jelliffe
2000/01/23

This document defines a simple language for use in testing conformance of implementations of Schematron 1.5. It can be used to create test suites, which give the input schema and document, and the appropriate output document in this Conformance Language.

DTD

   <!ELEMENT schematron-output  
        ( ns*, (active-pattern, (fired-rule, ( failed-assert | successful-report)* )+ )+ )>
   
   <!-- only active patterns are reported -->
   <!ELEMENT active-pattern  EMPTY>
   <!-- only references are reported, not the diagnostic -->
   <!ELEMENT diagnostic-reference (#PCDATA)  >
   <!-- only failed assertions are reported -->
   <!ELEMENT failed-assert  ( diagnostic-reference*, text )>
   <!-- only rules that are fired are reported, abstract/extend handling
            should have been done before -->
   <!ELEMENT fired-rule EMPTY >
   <!-- only namespaces from sch:ns need to be reported -->
   <!ELEMENT ns EMPTY >
   <!-- only successful asserts are reported -->
   <!ELEMENT successful-report (  diagnostic-reference*, text ) >
   <!ELEMENT text (#PCDATA )>

    <!ATTLIST schematron-output
        title CDATA #IMPLIED
        phase NMTOKEN #IMPLIED >

   <!ATTLIST active-pattern
          id ID #IMPLIED
          name CDATA #IMPLIED 
          role NMTOKEN #IMPLIED >

   <!ATTLIST diagnostic-reference
         number NMTOKEN #REQUIRED >

   <!ATTLIST failed-assert
          id ID #IMPLIED
          location CDATA #REQUIRED
          test CDATA #REQUIRED 
          role NMTOKEN #IMPLIED >         

   <!ATTLIST fired-rule
          id ID #IMPLIED
          context CDATA #REQUIRED 
          role NMTOKEN #IMPLIED >         
   
   <!ATTLIST ns
          prefix NMTOKEN #REQUIRED
          uri  CDATA #REQUIRED >          

   <!ATTLIST successful-report
          id ID #IMPLIED
          location CDATA #REQUIRED
          test  CDATA #REQUIRED
          role NMTOKEN #IMPLIED >         
          
  

The language has been designed to fit on top of the new architecture, and is not exhaustive. Its purpose is to make sure the basics are in place. The location attribute gives the full path, with each element having an explicit [x] counter.