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.  Sortby support

    Posted Thu July 12, 2001 09:55 PM

    Hi,

    According to the new draft of the W3C about Xquery, a Sortby expression must return a single value for every context, otherwise an error should be raised. Quip, however, chooses to ignore the expression in this cases and produces a result anyway.

    Consider for example the following query:

    document(“data\tree-data.xml”)/book/section Sortby (…/author)

    The book has more than one author, so an error should be raised.

    Ahmed.


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: Sortby support

    Posted Fri July 13, 2001 08:57 AM

    Thank you for pointing this out. That one slipped my attention.

    As you can imagine, I am not always pleased, when a new draft of the W3C
    working group is published, because it means work…

    Therefore, I am afraid you will find more such inconsistencies, (e.g. the filter function of
    quip takes two arguments, instead of just one as proposed in the latest draft.)

    However, I am always grateful, if someone points these things out, such that we
    can put them on our to-do list.

    Sven Eric


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: Sortby support

    Posted Wed July 18, 2001 04:20 PM

    I checked the documents of the query group again. You are right, in the
    XQuery 1.0 paper it says:

    For each member of the sequence, the ordering expression must return a single
    value of some type for which the “>” operator is defined (for example, a number or a
    string); otherwise an error results.

    But, as a matter of fact, > is defined on node-sets (even if it is not nicely defiend). In the
    semantics paper I did not find this restriction. There just a reference to the ordering
    relation > is made, which actually is defiend for sets as:

    [[ E1 < E2 ]]
    ==>
    [[ not(empty(for $v1 in [[E1]] return
    for $v2 in [[E2]] return
    if lt($v1, $v2) then $v1 else ())) ]] ]]


    Sven Eri


    #API-Management
    #Tamino
    #webMethods