Hi BaseX,
My question is about function
idref(). 
How it should be
applied in case of one-to-many relationships?
For example:
<root>
  <a id = "a1" idref =
"b1"> aaa1</a>
  <a id = "a2" idef =
"b1">aaa2</a>
  <a id = "a3" idef=
"b2"> aaa3</a>
  <b id = "b1" idref = "a1
a2">bb1</b>
  <b id = "b2" idref =
"a3">bb2</b>
</root>
The expression:
idref("a3")/..
gives the following result:
<b
id="b2" idref="a3">bb2</b>
But the expression:
idref("a1")/..
does not give any
result.
 
Thanks & regards,
Tsvetanka