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
  • 1.  Tamino implementation of XQuery

    Posted Fri June 06, 2003 07:45 PM

    Hi There,

    I have encountered a problem related to the max/min functions using Tamin XQuery.
    I am trying to get the maximum value of Elements with the following xquery

    let $info :=input()/BatchInfo[GroupID=“ssc_test”]/BatchScheduleTime return max($info)

    The output of this query results in the minimum value, whereas the following query

    let $info :=input()/BatchInfo[GroupID=“ssc_test”]/BatchScheduleTime return min($info)

    which uses the min function, results in the maximum value. I have tried with the XPath to get the maximum value with the following Query,

    max(BatchInfo[GroupID=“ssc_test”]/BatchScheduleTime)

    This results in a NaN in Tamino.
    I am attaching the schema(SharpStatementInfo) to test this query.

    Thanks and Regards,
    Ravi
    SharpStatementInfo.tsd (5.22 KB)


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


  • 2.  RE: Tamino implementation of XQuery

    Posted Fri June 06, 2003 08:40 PM

    Hello Ravi,

    I’m afraid that you may have posted the wrong schema.

    Which version of Tamino are you using? I tried similar queries with Tamino 4.1.1.9 and they worked correctly.
    (I tried the XQuery and the X-Query versions, using elements of type xs:integer and xs:string.)

    Perhaps there is something specific to the schema / Tamino version you are using…?

    Greetings,
    Trevor.


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


  • 3.  RE: Tamino implementation of XQuery

    Posted Sat June 07, 2003 07:20 AM

    Hi Trevor,

    Thanks for looking into the problem.

    Sorry, for sending the wrong Schema.
    Here is the latest one, and some sample data to test with.(Attached in a Zip file)

    Thanks and Regards,
    Ravi
    batchinfoschema.zip (3.69 KB)


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


  • 4.  RE: Tamino implementation of XQuery

    Posted Wed June 18, 2003 09:04 PM

    Hi Ravi,

    sorry for the long wait, I was otherwise engaged for a while!

    I have now tested the schema that you sent (with Tamino 4.1.1.9) and found that both of your XQuery expressions worked fine.
    (In the documents that you posted, the maximum value of “BatchScheduleTime” is “2003/12/12 01:00” and the minimum value is “2003/01/01 01:00” - these are returned by the min/max functions).

    Which version and patchlevel of Tamino are you using?

    Greetings,
    Trevor.


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