I just noticed (from here:
http://www.w3.org/TR/xslt20/#dt-default-priority) that in XSLT 2.0,
"/" has priority -0.5, whereas it has +0.5 in XSLT 1.0. I was
surprised to see this. Maybe it has no practical impact (other than
invalidating my easy-to-remember rule). Or am I missing something?
I'm trying to recall the reasoning. It was something like this: In XSLT
1.0, "/" (or a union with "/" as one of its branches) was the only
pattern that could ever match a document (aka root) node. So its
priority didn't really matter much, except perhaps in the artificial
case where you have two templates saying match="/", one with an explicit
priority and one without. In 2.0 it made sense to align its priority
with other patterns where the node-kind and nothing else was known: it
means the same as match="document-node()" which should logically have
the same priority as "element()" or "attribute()" or "text()". Retaining
the 1.0 priority would have meant match="/" having a higher priority
than match="document-node(element(invoice))", which would be
counter-intuitive.
Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--