For example:
para → 0 h:* → -0.25 * → -0.25 node() → -0.5 contents/para → 0.5 contents/* → 0.5
You can adjust the priority to get what you want with a 'priority' attribute.
<xsl:template match="h:*" priority="1"> ... </xsl:template>
If two templates match and they have the same priority, it is an error--but the processor can recover and choose the last template in document order.