From: Tatu S. <cow...@ya...> - 2007-03-01 04:27:23
|
--- Rodrigo Cunha <rn...@gm...> wrote: > Nah... given what i understand about the internal > structure making it > the new document root is not trivial, i think. I guess there are two different cases: one of using as context node (which seems trivially easy), where it doesn't limit xpath from going up the hierarchy; and the other that would essentially force a sub-tree to be new "sub-document" (so that xpath traversal would never go up past the sub-tree root). Latter would be only little bit more complicated unless I'm missing something. I mean, xpath processing code uses int indexes for traversing different axes; and it should be able to limit its visibility to sub-tree, which is just int-range (node-start-offset - to - next-sibling-offset-minus-1). That's one benefit of using consequtive int indexes, defining sub-trees is rather simple. -+ Tatu +- ____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index |