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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Help in XQuery!!

    Posted 08/01/03 11:56 AM

    :frowning: Trying to figure out how to convert this query to XQuery format…

    Product/SKU[@id~='']

    Anyone can help? Basically I want to get products that have sku id like "125
    " and do a sort in the return result.

    Can someone who is already expert in XQuery give me some lights?

    Please get the attached schema.

    Thanks.
    Catalog.tsd (2.9 KB)


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Help in XQuery!!

    Posted 08/04/03 01:13 PM

    I think you want

    Product/SKU[contains(@id, ‘*’)]

    Michael Kay


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: Help in XQuery!!

    Posted 08/05/03 03:51 AM

    Sorry. I got mix up the two words. (XQuery and X-Query).

    What I want is in XQuery my query string is Product/SKU[@id~=‘*’], so if I want to convert to X-Query string, what will it be.

    Thanks.


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: Help in XQuery!!

    Posted 08/05/03 06:18 AM

    Hi,

    I managed to resolve my puzzle. Thanks.

    But I got another problem. when I execute the following query in TXQuery API, I encounter Exception.

    path = “declare namespace ft="http://www.w3.org/2002/04/xquery-operators-text\”"+ " " +
    “for $product in input()/Product” + " " +
    “where (ft:text-contains($product/SKU/description,"” + input + “"))” + " " +
    “return count($product)”;

    TXQuery query = TXQuery.newInstance(path);
    TResponse responseB = accessorB.xquery(query);

    Is my XQuery string correct?


    Cheers,
    Hwee Choo


    #API-Management
    #webMethods
    #Tamino