Optomizing my query

Hi,
Had to modify my original question. Found some answers. We use ino: when loading a document. This allows us to quickly search for documents via ino:docname=’’ but so far I only know who to do this while using X-Query. Can you search and view ino information via XQuery instead?

Thanks!
Sal

yes, please use teh tf:getDocname function,

e.g.

for $x in input()/Person
where tf:getDocname(root($x))=“P1”
return $x

Please make sure to apply this function to document nodes only (i.e.,
use the root function to get the corresponding document node

regards

Harald

And don’t forget to add the tf namespace decl at the top of your XQuery so that it can resolve the function:

declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction

I’m getting Unknown Function. I am using Tamino 4.2.1 which I am to assume has XQuery 4 capabilities. Am I missing something.

The following query works with 4.2. I suggest you copy and paste it to test:

declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction
for $x in collection(“ino:etc”)/*
where tf:getDocname(root($x))=“P1”
return $x

Of course, it might not find a document, but you can check syntax and function usage this way