This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

template precedence problem



Hi All,

    Im have two template matches:

<xsl:template match="Cost"/>

and

<xsl:template match="*[
not(document('')//set:Sets/set:Set[@name='elementRules']/set:Item[@name=name()])
]">

I'd really like to apply specific template matches like "Cost" in
preference to my more generic "*[...]". However *[..] seems to take
precedence over "Cost". If I change *[...] to * precendence occurs the
way I'd like "Cost" is matched in preference to "*".

The XLST programmers spec indicates that this is correct behaviour. Why
does the xpath spec(?) allow more generic template matches to take
higher priority?. Will this occur in XPATH 2.0? Can someone provide me
with an xpath for my match *[..] that takes lower priority? I have
sucessfully corrected this by setting the priority attribute on *[...]
to a lower value. However I dislike doing this because it means every
time I add a new template to my stylesheet I need to think about its
priority in contrast the the prirorities I've forcibly adjusted.

thanks,
:) Ben


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]