IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  XQuery ino:id

    Posted Wed December 01, 2004 03:20 PM

    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 !!!


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: XQuery ino:id

    Posted Wed December 01, 2004 03:45 PM

    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


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: XQuery ino:id

    Posted Wed December 01, 2004 04:12 PM

    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.


    #webMethods
    #API-Management
    #Tamino