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 Join using Java API

    Posted Fri October 08, 2004 11:22 AM

    I am using Tamino 4.2.1 trial version along with TaminoAPI4J that came with the distribution.

    Not sure if the question belongs here. But I am trying to query across collections in a Tamino database. What do I have to do?

    If i initialise the TXMLObjectAccessor to a particular connection, how do I issue an XQuery that references a document in another collection. I am a bit confused about syntax here.

    Thanks in advance
    Vyom


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 2.  RE: XQuery Join using Java API

    Posted Fri October 08, 2004 06:33 PM

    Hello Vyom,

    this is quite straightforward: use the “collection” function to return documents from another collection.

    You have probably seen a lot of example queries which use the “input” function to specify a set of documents in Tamino… The “collection” function can be used in the same way - the only difference is that “collection” takes a parameter: the name of the collection to read the documents from.

    So, if you have established a connection to “MyColl_A” in your program, the following XQuery would return [all of the] documents from “MyColl_Z”:

       for $others in collection("MyColl_Z")
    return $others


    You can filter the set of documents in the same ways as with the “input” function: putting a path expression after the function, e.g. collection(“MyColl_Z”)/MyDoc[@id=“007”], or with a WHERE clause.

    I hope that helps.
    Trevor.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: XQuery Join using Java API

    Posted Fri June 17, 2005 04:22 PM

    Hi,

    I’ve tried to execute a query using two different collections, but i got a problem with the function “collection”… I can’t find the java class that contains that function … ??? Where is it?

    Thanks in advance,

    Malena


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 4.  RE: XQuery Join using Java API

    Posted Fri June 17, 2005 05:07 PM

    Oops!

    It works! I changed a piece of code…

    Malena


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs