xsl-list
[Top] [All Lists]

[xsl] Template match priority

2012-07-10 11:55:53
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>