Hmmmm. We knew we might be deoptimizing DOM performance in exchange for
better SAX performance, and in order to optimize for the needs of the XSLT
processor... but I agree we should pause and think carefully about this.

One possible approach: Pre-analyse the XPath to see if it's going to need
to look upward/leftward from the starting node. If we can be certain it
won't, we can consider building a DTM for just the subtree that's being
walked. Downside of this is that it's much harder to reuse our work if you
then issue another query against an overlapping portion of the tree.

Reply via email to