You don't say why you think it's a bug, but it isn't. The query retrieves an attribute node, and a single freestanding attribute node cannot be serialized - see the Serialization spec for details of this error condition. The way you solve the problem depends on what you actually want as the output. If you want the output in the form
for example, you would have to construct this yourself. If you just want the value, then call the string() function.
In many cases with idref you really want the containing element, which you can get by calling idref(xyz)/..
Michael Kay

From: [] On Behalf Of Loredana Afanasiev
Sent: 17 May 2006 18:49
Subject: [saxon] a buggy idref() ?


The query bellow

for $x in doc("xmarkf0.001.xml")//people/person

when run on Saxon 8.7J gives the following error:

Error on line 3 of file:/scratch/lafanasi/XCheck/temp1.xq:
  SENR0001: Cannot serialize a free-standing attribute node (person)
Query processing failed: Run-time errors were reported

To me this looks like a bug, isn't?

Thanks in advance,