From: Wolfgang M. <wol...@gm...> - 2006-02-13 10:15:14
|
Hi Sava, > Executing the following query returns the error: > > let $id :=3D //user/@id > return > $id > ------------------------------------------------------ > Error: > An error occurred while retrieving results: org.xml.sax.SAXException: Err= or > SENR0001: attribute 'id' has no parent element This is not a bug. The XQuery spec explicitely forbids the serialization of a single attribute node. An attribute node can only be serialized if it has a parent element. You thus need to either return the whole //user element or cast the @id to string: let $id :=3D string(//user/@id) Wolfgang |