XQuery ino:id

Hi,

i have this database:
http://localhost/tamino/Cinetheque/

and the collection “cinetheque” with the doctype "client"

and i want to get, for example the document at ino:id = 100

but this don’t get input()/client[@ino:id=“100”]

i must traverse all the database with a " for … " ???



Thanks !!!

It depends on how you are accessing the document. I.e. the following URL should show you your document.

http://localhost/tamino/Cinetheque/cinetheque/client/@100

The easiest way to access a document with a known ino:id is to use the URL (as in Mark’s example).

In terms of formulating a XQuery query to do this then something like the following will work:

  
declare namespace tf =  "http://namespaces.softwareag.com/tamino/TaminoFunction"
for $x in input()/client
where tf:getInoId($x) = 100
return $x



The for will only iterate over one document since the tf:getInoId will only preselect one document, i.e the document with ino:id = 100.

In each case the document will be returned without the ino:id attribute.

Hope this helps.

Stuart Fyffe-Collins
Software AG (UK) Ltd.