Subject: Template match priority
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Tue, 10 Jul 2012 09:55:39 -0700
|
Lets see, do I understand this correctly?
A template match of * out-weighs a template match of some named node? IE.,
<xsl:template match="*">
<!-- i win -->
</xsl:template/>
<xsl:template match="my_node">
<!-- i'm a loser baby -->
</xsl:template match
From: http://www.w3.org/TR/xslt/#conflict
If the pattern has the form NCName:* preceded by a
ChildOrAttributeAxisSpecifier, then the priority is -0.25.
Otherwise, if the pattern consists of just a NodeTest preceded by a
ChildOrAttributeAxisSpecifier, then the priority is -0.5.
I would think it the other way, a * having a lesser default priority.
Karl..
--
Karl Stubsjoen
MeetScoresOnline.com
(602) 845-0006
|