XSLT processor will only ever process one template when you apply templates to a node, so it has to choose one among all matched templates based on the matched priority.
        <template matching="something" priority="1"> . If there is no explicit priority assigned to a template, it will used default priority.

        <ul>
        <li>Patterns that match a class of nodes, such as *, which matches all elements, are assigned an implicit priority of -0.5</li>
        <li>Patterns that match nodes according to their name, such as Character, which matches  <Character> elements are assigned an implicit priority of 0.</li>
        <li>Patterns that matches nodes according to their context, such as CastMember/Charcter are assgined an implicit priority of 0.5</li>
        </ul>

        <p>
        When assigning priorities based on patterns, it doesn't matter how specific the ontext information is. If you specify any context for a node, then the template has priority of 0.5. For example, Description/Link/Character has exactly the same priority as Description//Character. Technically, it's an error if you have two templates that mache the same node and the match patterns for the two templates have the same node and the matche patterns for the two templates have the same specificity. However, most processors recover from the error, which means they use the last template that you've defined in the stylesheet. You should try to avoid having templates that have the same priority and can feasibly match the same node; use the priority attribute to assign them specific, different priorities.
        </p>

        <pre data-sub="prettyprint:_">
        </pre>