Hi Martin,
the predicate gets evaluate for each result of the XPath-step. BaseX's output is expected.
The query you wanted to perform is (/descendant::c)[1] which only returns the first result over all.
Best regards, Jens Erat » web: www.jenserat.de » email: jens.erat@uni-konstanz.de » phone: 0151 56961126 » weitere und aktuelle Kontaktmöglichkeiten: www.jenserat.de/kontakt
Am 09.11.2010 um 22:18 schrieb Martin Gieseking:
Hi,
while playing around with BaseX, I stumbled over some weird results in conjunction with positional predicates on the descendant axis. As far as I can see, there seems to be a bug in the evaluation of function position().
Example: When I load the following XML document and evaluate the path expression /descendant::c[1], both c element nodes are returned, but only the first one is expected. So, currently the result is identical to that of //c[1].
<a> <b> <c/> </b> <b> <c/> </b> </a>
Best regards, Martin _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk