TQuery to obtain the ino:id of a Non XML


I want to obtain the ino:id and the ino:docname of the resources added in a doctype. I use the TQuery(doctype). I found out that this brings from the server the whole document. For xml I can use : TQuery(“doctype/@ino:id”) but for NON XML it doesn’t work.

Is it a way to do it for Non XML, too?


ok, I found out how. Using tf:getInoId() function.

But the code below throw the exception

Database access failure (6321, INOXQE6321, Runtime type exception: invalid node-type, Expected NodeType: document):

declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction
declare namespace ino=“http://namespaces.softwareag.com/tamino/response2
for $q in collection(“Personal_Info”)/ino:nonXML


The parameter for tf:getDocname must be a document node. Try changing your code to read tf:getDocname(root($q)).

Thanks, It works now!

Any way, with the method I presented before problems can come up if the doctype has a prefix (xsl:stylesheet) because the xquery needs the namespace to be declared.

A faster way I found to obtain both the docname and id is through TQuery:

                           doctype/@ino:docname | @ino:id  

Previously I’ve tried “doctype/@*” and “doctype/@ino:docname , @ino:id” but the syntax seems not to be implemented in tamino xpath.