> > - The fn:path functions returns a wrong result for the following doc/query:
> >
> > doc.xml
> > <a><b/><b/></a>
> >
> > fn:path(doc("doc.xml")/a/b[2])
> > /"":a[2]/"":b[1]
> Oh It seems I used the wrong value for the position. I have a question about
> this I was using Item->getRefCount() for the value of the position of the
> node, but it appears to be wrong is that info on the node stored anywhere
> else? if not should I implement it as info inside the Item? or just for the
> function?
getRefCount() returns the number of references to the node. It cannot be used 
as the position among siblings. I'm afraid there is no such information stored 
in a node. You probably have to count the number of preceding siblings, i.e. go 
to the parent and iterate over the children until you reached the node in 
Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to