Processing modes

Modes allow to have more templates with the same match patterns for different purposes, eg.:

  • one for generating ToC of a document

  • second for generating full-text of the document

One can switch on the mode when using apply-templates with attribute mode:

  • if mode= is present, only templates with the same mode will match

  • if not present, only templates without any mode attribute will match