xsl-list
[Top] [All Lists]

RE: postion gives me 2 instead of 1

2003-06-20 10:37:17
I don't understand why this is so. I thought the templates 
that were most specific got applied before the ones that were 
more general?

The rule is that higher-priority templates get applied in preference to
lower-priority ones. The default priority is assessed based on some very
simple rules that are related to how "specific" the template rule is,
but the rules do not guarantee that if rule R1 matches a subset of the
nodes that R2 matches, then R1 always has higher priority. In your case,
both the rules have the same priority.

It's always safest to use explicit priority attributes if you have
several rules that match the same nodes.

Michael Kay


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



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