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.  Temporal calculations in XQuery/Tamino

    Posted Wed March 10, 2004 01:33 PM

    I’m trying to perform date-based (xs:date) operations and am looking for the current alternative to the now deprecated add-days() function (from a prior version of QUIP that I’m working from as reference). The X-Query function documentation has a link to [XQuery 1.0 and XPath 2.0 Functions and Operators]|XQuery 1.0 and XPath 2.0 Functions and Operators, but it’s not clear which (if any) of the functions there are supported. In particular, I tried:

    {
    xs:date(“1977-01-18”) + xf:dayTimeDuration(“P30D”)
    }

    response:

    <?xml version="1.0" encoding="windows-1252" ?>
    <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>
    <xq:query xmlns:xq=“http://namespaces.softwareag.com/tamino/XQuery/result”>

    </xq:query>
    <ino:message ino:returnvalue=“6358”>
    <ino:messagetext ino:code=“INOXQE6358”>Function unknown</ino:messagetext>
    ino:messagelineFunction: http://www.w3.org/2002/08/xquery-functions:dayTimeDuration</ino:messageline>
    </ino:message>
    </ino:response>

    I’m assuming I’m either using the wrong namespace or that function simply isn’t implemented. What’s the current way to do this? My platform is:

    Tamino 4.1.4
    Sun Solaris 8


    Chimezie Thomas-Ogbuji
    Lead System Analyst
    Cleveland Clinic Foundation


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: Temporal calculations in XQuery/Tamino

    Posted Thu March 11, 2004 10:27 AM

    Hi,

    sadly Tamino does not yet support addition with duration types since
    this involves either xdt:yearMonthDuration or xdt:dayTimeDuration
    (xdt bound to http://www.w3.org/2003/11/xpath-datatypes) that are not
    yet implemented in Tamino.

    Regards,
    Juliane.


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Temporal calculations in XQuery/Tamino

    Posted Tue April 27, 2004 01:24 PM

    Hi!

    What types of operations are supported by Tamino?

    For example, can I do a XQuery, which return all items with a xs:date element newer than a specified xs:date element? (e.g. all users registered after 01 April 2004)

    Regards,
    Christian


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: Temporal calculations in XQuery/Tamino

    Posted Tue April 27, 2004 06:00 PM

    Hi Christian,

    yes, Tamino can do a comparison between dates, thus

    declare namespace xs=“http://www.w3.org/2001/XMLSchema"<BR>xs:date("1977-01-18”) < xs:date(“1977-01-18”)

    yields false and replacing < by <= yields true.

    Regards,
    Juliane.


    #API-Management
    #webMethods
    #Tamino