> Is there a way to skip a portion of the dom tree during an xpath traversal?
Yes, you can provide a particular context node, so the search starts from that point. > [I can also change the xalan source code and submit a patch for this functionality.] Well, more detail about what you're trying to do would be the best place to start. > The dom tree that i am traversing is pretty big but one subtree is very expensive to > traverse due to its size. The xpath queries don't normally require me to traverse that > subtree so i want to skip it for normal xpath traversals. Well, why don't you write your query to skip that particular subtrees? > The problem comes with // expressions or following:: or preceding:: expressions. the > xpath engine starts traversing the whole dom tree and the efficiency is significantly reduced. Using // or the following and preceeding axes will always be expensive in large tree. Can you re-write your XPath expressions to narrow down what you really want to look at? > Can i put some restriction in the xpath engine for this? No. If you don't want to search a large tree, write your XPath expressions in such a way that you're not searching the entire tree, or don't build the subtrees you're not interested in. Your description is so abstract it's difficult to offer any advice. A few concrete examples of the XPath expressions that are problematic might help us understand what you're trying to do. Dave
