The syntax for patterns is a subset of the syntax for expressions. In particular, location paths that meet certain restrictions can be used as patterns. A few examples of patterns follow. The match attribute is a Pattern that identifies the source node or nodes to which the rule applies. When in doubt, use the priority attribute.
Modes allow an element to be processed multiple times, each time producing a different result.
There is a built-in template rule to allow recursive processing to continue in the absence of a successful pattern match by an explicit template rule in the stylesheet. This template rule applies to both element nodes and the root node. There is a built-in template rule for each mode, which allows recursive processing to continue in the same mode in the absence of a successful pattern match by an explicit template rule in the stylesheet. The built-in template rule for processing instructions and comments is to do nothing. These built-in template rules have have a lower import precedence than all other template rules.