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.  [FLWOR] order by doesn´t work?

    Posted 03/22/05 02:04 PM

    Hi,

    I try to get some data from an XML-Database using the following FLWOR-Code:

    
    <Projekte>
    {let $projekt := 
    for $p in collection("/db/bka/projects/current")//STM_Projekt
    order by $p/STM_Kurzbezeichnung
    return $p,
    $count := count($projekt),
    $begin := 1,
    $max := 10,
    $end := if($count >= $max) then $max else $count
    for $i in $begin to $end
    return
    <Projekt>
    <STM_Kurzbezeichnung href="index.php?nav=p.prwart.stmdat&project={item-at($projekt/../@ProjektID, $i)}">{item-at($projekt/STM_Kurzbezeichnung/text(), $i)}</STM_Kurzbezeichnung>
    <STM_Projektbezeichnung href="false">{item-at($projekt/STM_Projektbezeichnung/text(), $i)}</STM_Projektbezeichnung>
    </Projekt>
    }
    </Projekte>

    But the DB answers with an error: “Operation not supported”. Without the Line " order by $p/STM_Kurzbezeichnung" it works. I want the list to be ordered before the line “for $i in $begin to $end”. Is this possible?

    Thanks in advance,
    Baerlie


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: [FLWOR] order by doesn´t work?

    Posted 03/22/05 02:24 PM

    I suspect that “sort by” may do what you want.


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: [FLWOR] order by doesn´t work?

    Posted 03/22/05 02:37 PM

    “sort by” causes an error:

    Error found: error found while executing eval expression: unexpected token: sort


    #API-Management
    #webMethods
    #Tamino


  • 4.  RE: [FLWOR] order by doesn´t work?

    Posted 03/22/05 02:43 PM

    The format of the query is:

    
    declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
    for $a in input()/A
    let $lm :=tf:getLastModified(root($a))
    return <X lastmodified="{$lm}">{$a}</X> sort by (./@lastmodified)

    #webMethods
    #API-Management
    #Tamino