22.1. Relationship between `schematron` and `documentHook`
Prev | 22. schematron | Next

### 22.1. Relationship between `schematron` and `documentHook`

This `schematron` configuration element is a documentHook configuration element in disguise. A `schematron` element is equivalent to:

    <documentHook name="Schematron">
      <class>com.xmlmind.xmleditapp.config.SchematronHook</class>
    </documentHook>

However the above syntax cannot be used for `SchematronHook` which requires a number of arguments (e.g. the URL of the schematron).

This information is worth mentioning for two reasons:

1. Document hooks are ordered. They are invoked in the order of their declarations. This is also true for `schematron`. In the example below, schematron validation is guaranteed to be invoked after the DocBook document hook:

       <!-- Fixes the cols attribute of tgroup and entrytbl if needed to. -->
       <documentHook>
         <class>com.xmlmind.xmleditapp.docbook.table.DocumentHookImpl</class>
       </documentHook>

       <schematron location="docbook.sch" />

2. The snippet below may be used to remove previously declared `schematron`.

       <documentHook name="Schematron" />

Prev | Up | Next
22. schematron | Home | 23. spellCheckOptions