xsl-list
[Top] [All Lists]

[xsl] priority of key patterns

2012-11-14 00:52:00
Would I be right in concluding that the default priority of the first
template below that features a call to a key function in the match
pattern is 0.5.

  <xsl:template match="key('privateData','private')" priority="-0.1">
    <private oldName="{local-name()}">
      <xsl:apply-templates select="node()|@*"/>
    </private>
  </xsl:template>

  <xsl:template match="*|PayloadFile">
   <xsl:element name="{local-name()}">
      <xsl:apply-templates select="node()|@*"/>
   </xsl:element>

I found myself having to override the priority in order to ensure that
the PayloadFile element (otherwise caught by the key) would be
processed by the 2nd template rule.

On an unrelated note not worth starting a new thread, I tried using
except in an xsl:key match clause - which was rejected. I presume it
is one of those pattern rules that I keep falling foul of (XSLT 2.0).

--~------------------------------------------------------------------
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>