Subject: Re: [xsl] XPath equivalence question From: Michael Kay <mike@xxxxxxxxxxxx> Date: Thu, 01 Dec 2011 00:28:47 +0000 |
DoesYes, I think so.
<xsl:template match="/A//B">
match exactly the same thing as
<xsl:template match="B[/A]">?
Saxon actually has different implementations for the two cases (I've often thought of normalizing patterns so they would end up the same internally, but have never got around to it). But the logic of the two implementations is pretty well identical, and I would be very suprised if there is any measurable performance difference.
My presumption is that the second form is preferable on efficiency grounds -- on simple table lookup versus whatever tree-structure the descendant axis search produces -- but I don't actually know.
Michael Kay Saxonica
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath equivalence question, Graydon | Thread | Re: [xsl] XPath equivalence questio, Graydon |
[xsl] XPath equivalence question, Graydon | Date | Re: [xsl] XPath equivalence questio, Graydon |
Month |