Thanks Andy,
yes, this looks like a bug, which I've just memorized in GitHub:
https://github.com/BaseXdb/basex/issues/285
Thanks, Christian ___________________________
On Tue, Nov 22, 2011 at 4:31 PM, Andy Bunce bunce.andy@gmail.com wrote:
Hi,
The BaseX 7.0.2 handling of fn:element-with-id seems wrong to me. BaseX seems to treat attributes named id as ids - fair enough, I guess it has no id elements.
http://www.w3.org/TR/xpath-functions-30/#func-element-with-id says: The effect of this function is identical to fn:id in respect of elements that have an attribute with the is-id property. so given: let $xml :=document{
<a id="0"> <b id="1" >f</b> <b id="2"><g id="2.1">hello</g></b> <b xml:id="3">goodbye</b> </a> } I would expect $xml/id("1") and $xml/element-with-id("1") to both return <b id="1">f</b> .
------result-------------------------------------------------------- <b id="1">f</b> ---- <a id="0"> <b id="1">f</b> <b id="2"> <g id="2.1">hello</g> </b> <b xml:id="3">l</b>
</a> --------------------------- /Andy
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk