XSLT - input document processing

  • First, the processor selects the document root (not the root element) - corresponding to the XPath expression /

  • Then the processor finds a matching template (explicit or implicit - see eg. XSLT/XPath Quick Reference), where the match attribute as an XPath predicate returns true in the context of the current node ("matches" the current node).

  • if there are more matching templates and they cannot be distinguished/ordered by priority - an error is indicated.

  • if there is just one such template, it is applied, ie. its body is translated into the result tree fragment.