If multiple templates match, the "most specific" is taken.
The "most specific" is calculated in terms of priorities.
Single names (e.g. "para") have priority 0.
Wildcards (e.g. *, @*) have priority -0.25
Node tests for other nodes (e.g. comment(), node(), etc. ) have priority -0.5
Otherwise, the priority is 0.5