<p>This is a <i>test</i>.
The problem of multiple patterns that match is handled by conflict resolution:
Matching templates from imported modules are not considered
if there is a matching template in the current module
Matching templates with a lower priority
are not considered. The default priority is determined as follows:
Unqualified child or attribute names have a priority of 0.
Processing-instructions with a target have a priority of 0.
A namespace-qualified "*" child or attribute name
has a priority of -0.25.
An unqualified "*" has a priority of -0.5
Any other template has a default priority of 0.5
Template priority may be specified explicitly with the priority
attribute on <xsl:template>
and "@foo" have a priority of 0
"html:*" has a priority of
"*" has a priority of -0.5
"para/emphasis" has a priority
"emphasis/emphasis" has a priority
"emphasis[@role]" has a priority
It is technically an error if the conflict resolution process yields
more than one template, however, XSLT processors may (silently) recover from
this error by selecting the template that occurs last in the stylesheet.
Effectively, this means that stylesheet template order is the final
Changing the Template Set
Now we have an algorithm for selecting exactly which pattern
matches, but what happens if the same elements must be processed in multiple
contexts? This happens, for example, when dealing with cross references, automatic
tables of contents, and multiple views of the same data.