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

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

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

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

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. -->
       <validateHook>
         <class>com.xmlmind.xmleditext.docbook.table.ValidateHookImpl</class>
       </validateHook>

       <schematron location="docbook.sch" />

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

       <validateHook name="Schematron" />

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