BaseXdb/basex — Issue #285: id() vs. element-with-id()
Author: ChristianGruen
Created: 2011-11-22 15:34:26+00:00
State: open
Labels: bug, XQuery

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:

```xquery
let $xml :=document{

f
hello
goodbye

}
```

Expected:

$xml/id("1") and $xml/element-with-id("1") to both return <b id="1">f</b>.

Result:

```xml
f
----

f

hello

l

```