How to get ino:docname attribute using XQuery?

Hi,
I would like to know how can I get or ask for the attribute
"ino:docname" (NonXML doctype) using XQuery?

Thanks,
Guillermo

Hello Guille,

declare the namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction” in your XQuery prolog, then use the function tf:getDocname($doc) to get the docname.
(The value of $doc should be a document node.)

I hope that helps,
Trevor.

Hi Trevor,
Thanks a lot for your help. I could get the ino:docname value using tf:getDocname($a/…).

My XQuery:
declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"
for $a in input()/NonXmlIndexer1
return tf:getDocname($a/…)

If you use tf:getDocname($a) instead of tf:getDocname($a/…) you will get the error:

INOXQE6301: Runtime type exception

Regards,
Guillermo