4. `schematron` options
Prev |  | Next

## 4. `schematron` options

Usage:

    xmltool schematron schematron_options common_options schematron [ xml_file ]*

Validate specified XML documents against specified Schematron.

Optionally validate the Schematron itself.

Unless the `-iso` option is used, the Schematron may be embedded in another type of XML document (e.g. a DocBook 5 RELAX NG grammar not using the compact syntax).

-iso

  Fully validate the Schematron as an ISO Schematron schema.

  Default: do not validate the Schematron, just load it.

  Note that the Schematron loader is very lenient and accepts ISO Schematron as well as Schematron 1.5 schemas.

-o `out_schematron_file`

  Save the Schematron to specified file. The written schema is in all cases an ISO Schematron schema using the minimal syntax.

-phase `phase_id`

  Specifies the ID of the phase which is to be used for validation. May also be `#ALL` or `#DEFAULT`.

  Default: `#DEFAULT`, if any, `#ALL` otherwise.

-var `name` `value`

  Specify overrides for some of the let variables defined in the Schematron.

  Note that value must be a valid XPath expression and not a plain string.

Example: Validate `docbook.sch` as an ISO Schematron schema. Additionally save a copy in `/tmp/out.sch`.

    /opt/xxe/addon/config/docbook$ xmltool schematron -iso -o /tmp/out.sch docbook.sch

Example: Validate docbook-image.xml against `docbook.sch`.

    /opt/xxe/demo$ xmltool schematron ../addon/config/docbook/docbook.sch \
        docbook-image.xml

Example: Validate `docbook-image.xml` against `docbook.sch`, using phase `#ALL`. Pass to the Schematron variable `foo` having XPath string literal "`bar`" as its value.

    /opt/xxe/demo$ xmltool schematron -phase '#ALL' -var foo '"bar"' \
        ../addon/config/docbook/docbook.sch \
        docbook-image.xml

Prev |  | Next
3. `indent` options | Home | 5. `schemadoc` options