On Sun, 2009-12-13 at 16:16 +0000, Michael Kay wrote:
> Are you asking because you have your own implementation of NodeInfo? If so,
> I think you need to be prepared to do your own debugging to answer this kind
> of question...
> I would expect the query to translate statically into count(/descendant::b),
> which will result in a call on iterateAxis(Axis.DESCENDANT) on the document
> node. If the returned iterator has the property LAST_POSITION_FINDER then
> count() will call its getLastPosition() method, otherwise it will step
> through the iterator and count how many items there are.
shouldn't //b translate to /descendant-or-self::node()/descendant::b?
Hm yes, my own implementation, but I can see that all nodes are
traveresed with a descendant step and that the qName and localName are
two times "b", so I don't really know why it counts 1 instead of 2.
I'm extending Navigator.BaseEnumeration and I'm calling makeWrapper(...)
like it's done in the JDOM implementation, but I think the error in my
implementation must be somewhere else.
It seems, that compareOrder(...) is also implemented right. So do you
perhaps have an idea which method(s) could be wrong? I really have no
clue, maybe it's somehow because of the attribute the second b-element