Tamino implementation of XQuery

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,


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

Thanks and Regards,
SharpStatementInfo.tsd (5.22 KB)

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 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…?


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,
batchinfoschema.zip (3.69 KB)

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