schematronEdition

Table of Contents

Declaration
Related GitHub issue(s)
Sample usage
Commentary

Element context(s)

This attribute is optional and states the version of Schematron (i.e. which edition of the standard) the schema conforms to.

Clause 5.5.15 (schematronEdition attribute)

The value of this attribute where specified shall be 2025.

Schemas should specify this attribute.

Implementations shall report the value or the absence of this attribute at user option.

Declaration

element schema {
        attribute id { xsd:ID }?,
        rich,
        attribute schemaVersion { non-empty-string }?,
        attribute schematronEdition { non-empty-string }?,
        attribute defaultPhase { xsd:IDREF }?,
        attribute queryBinding { non-empty-string }?,
        (foreign
         & (inclusion | extends)*
         & (title?, ns*, p*, param*, let*, phase*, abstract-rules*, (rule-set|pattern)+, p*, diagnostics?, properties?))
    }

Related GitHub issue(s)

Proposal for proper language versioning system

Sample usage

Example 5. schematronEdition attribute

<sch:schema schematronEdition='2025'>
  <sch:pattern>
    <sch:rule context='*'>
      <sch:report test='true()'><sch:name/></sch:report>
    </sch:rule>
  </sch:pattern>
</sch:schema>

The implementation XQS for example implements this feature using a command-line (and API) option, report-edition. If this is switched on, the application reports an empty schema element, including any schematronEdition attribute, as the first item returned, e.g.

<schema xmlns='http://purl.oclc.org/dsdl/schematron' schematronEdition='2025'/>

Commentary

This attribute provides a mechanism to differentiate the version of schema markup used without changing the namespace for schemas generally, in the interests of backward compatibility.