I agree with Sam. One point, though, is that ancestor::h1 is likely to be a faster test than ancestor::*[local-name()='h1']. It's also cleaner: the whole point about namespaces is that the name "h1" only means anything in the context of a particular namespace.
If your stylesheet is unacceptably slow, it's unlikely that this expression is the problem. (And if it's not, why are you worried?)
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|