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.

 View Only
  • 1.  FLWR syntax

    Posted Tue November 27, 2001 01:37 PM

    Is it possible to add a predicate to the
    end of a FOR clause?
    ForClause ::= “for” Variable “in” Expr (“,” Variable “in” Expr)*
    implies not.

    I’m thinking of selecting
    FOR $a IN $cnt [ number($cnt/bibno) < ‘1000’]
    to iterate over $cnt only as far as the bibno
    child value = 1000.

    Regards DaveP


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: FLWR syntax

    Posted Wed November 28, 2001 04:33 PM

    FOR $a IN $cnt[ int(./bibno) < 1000]
    return {$a}

    the above is exactly one way to do this in XQuery.
    Just use the XPath qualifier syntax.

    Another way to express this is by way the
    where clause:

    FOR $a IN $cnt
    where int($a/bibno) < 1000
    return {$a}


    Sven Eric


    #Tamino
    #webMethods
    #API-Management