[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath equivalence question
On 30/11/2011 23:48, Graydon wrote:
DoesYes, I think so. 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. You seem to be basing you reasoning on some kind of hypothetical implementation model which has no resemblance to the way it's implemented in Saxon and may have little resemblance to any other product. In both cases, in Saxon, the test whether a node matches the pattern will start by asking whether it is an element named B, and then proceed by asking whether it has an ancestor named A that is a child of the root document node. In both cases, if you do an apply-templates that selects a node named C, this rule won't even be considered and will have no impact on the performance. Michael Kay Saxonica
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|