webMethods

webMethods

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
Expand all | Collapse all

Using xquery and function call together in java program

  • 1.  Using xquery and function call together in java program

    Posted Wed August 13, 2003 06:14 PM

    Hi,

    I am trying to invoke a xquery + function call together from my java code.
    - So how should the query string in java look like ? I can obtained the $q object, but unable to invoke the function call
    - I am trying to obtained the ino:id together in 01 database operation , is this possible with XQuery in Java API ?
    - If not any suggesstion / advise ?

    xquery:
    declare namespace tf=“htp://namespaces/softwareag.com/tamino/TaminoFunction”
    for $q/ownerId=490
    return

    tf:getInoId



    In addition, can anyone advise me on the following:
    - its seems that Tamino’s support for XQuery 4 is not very mature (eg no direct access for ino:id), so should I switch to X-Query instead (using with Java code)

    Thanks in advance.


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


  • 2.  RE: Using xquery and function call together in java program

    Posted Thu August 14, 2003 12:46 PM

    A sample for returning the documents with the ino:id in one query together is this:

    declare namespace tf=‘http://namespaces.softwareag.com/tamino/TaminoFunction
    for $p in input()/Property
    return {$p}

    So you only missed the ($q) bit in your query and it should work like this:

    declare namespace tf=“htp://namespaces/softwareag.com/tamino/TaminoFunction”
    for $q/ownerId=490
    return

    tf:getInoId($q)



    > - its seems that Tamino’s support for XQuery 4 is not very mature
    > (eg no direct access for ino:id), so should I switch to X-Query instead (using with Java code)

    Not true, ino:id is no part of XQuery, therefore this has nothing to do with maturity, but will never be possible. But you can always use tf:getInoId() as shown above. So there is no reason to switch to X-Query.

    Hope this helps …


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


  • 3.  RE: Using xquery and function call together in java program

    Posted Thu August 14, 2003 07:12 PM