xsl-list
[Top] [All Lists]

RE: Do Templates Conflict?

2005-05-05 01:57:45
There is a massive gotcha here (or a bug in the spec, 
depending on your point of view).

A feature, I think!
Note the template in 'a.xsl' specifies priority 10.  Even 
with this, the
output is 'B' from 'b.xsl'.  Because the first rule in 
template conflict
resolution is import precedence, and one of the rules of import
precedence is 'the last import wins', so the processor ignores all the
usual ways to control priority.  

However in this case, the usual "ambiguous rule match" warning isn't
output, making it very hard to track down.  I have asked Mike on the
Saxon list a while back if it's possible to give a warning for this
specific case, so hopefully it will make it into 8.5 :)  

This test would be a very expensive one, and it would give a lot of spurious
messages for perfectly valid stylesheets. The test would therefore have to
be switched off by default; but 99% of the people who would be helped by the
test wouldn't know about the switch. So it's not clear that this is a useful
thing to do.

Michael Kay
http://www.saxonica.com/



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