You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Jaspreet Singh <Ja...@quark.co.in> on 2004/10/01 15:19:48 UTC
xpath query
if i evaluate .//A i get all A nodes. i should get all A nodes from the
context that i've passed. is this a bug or a feature?
also, if i say /A/B[3]/preceding-sibling::B[1]
does xalan stop processing nodes when it gets the required node? or does it
create a list of all preceding siblings and then selects the first one?
thanks
jaspreet
Re: xpath query
Posted by da...@us.ibm.com.
> if i evaluate .//A i get all A nodes. i should get all A nodes from the
context that
> i've passed. is this a bug or a feature?
You should get all A descendants from the context or and the context node,
if it's an A. If that's not what you're getting, then please file a bug
report, and include a _simple_ set of inputs, including source code, that
reproduces the problem.
> also, if i say /A/B[3]/preceding-sibling::B[1]
> does xalan stop processing nodes when it gets the required node?
> or does it create a list of all preceding siblings and then selects the
first one?
It finds all of the nodes, then applies the predicate. This is something
we could optimize at some point, but depending on the axis, it can be very
tricky.
Dave