Namespace prefix undefined

I have a problem with x-query and xquery.
With x-query i do /tns:presence and i get my document, but when i try with xquery (input()/tns:presence) i get this inomsg
<ino:message ino:returnvalue=“6354”>
<ino:messagetext ino:code=“INOXQE6354”>Namespace prefix undefined:</ino:messagetext>
ino:messagelineNamespace Prefix undefined: tns</ino:messageline>

BRGS
@nto
</ino:message>

Hello @nto,

I suspect that the namespace declaration is missing in the Query Prolog of the XQuery expression.

Add something like this as the first line of the XQuery:

   declare namespace tns="urn:ietf:params:xml:ns:cpim-pidf"


I hope that helps,
Trevor.