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.  Sorting by inoid

    Posted Fri March 26, 2004 02:28 PM

    Hello,
    I have the following xquery:

    declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
    for $b in input()/STLBibliographicIbermarc
    where tf:getInoId($b) < 10 
    return tf:getInoId($b) 
    sort by tf:getInoId($b) descending


    There appears to have a problem with this code in the sort clause. The behavior I want to achieve is simply to sort the resutset by inoid descending. Can anyone help me?
    Thanks in advance,
    Julien Martin.


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: Sorting by inoid

    Posted Tue March 30, 2004 09:41 AM

    Hello,
    you probably mean

    sort by (. descending)

    Sort by is a separate expression, which is applied on the complete result sequence of the FLWR expression.
    Note in the mean time the XQuery draft has changed to the FLWOR expression, where the ordering is integrated into the FLWR.

    Best regards
    Walter


    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: Sorting by inoid

    Posted Tue March 30, 2004 09:57 AM


  • 4.  RE: Sorting by inoid

    Posted Tue March 30, 2004 02:10 PM

    Hi Julien,

    declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction
    for $b in input()/STLBibliographicIbermarc
    return $b
    sort by (tf:getInoId(.))

    sorts documents by InoId. Walters solution is correct but does
    not work, this is a bug.

    Regards,
    Juliane.


    #API-Management
    #Tamino
    #webMethods