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.  Q:More challenges ;-)

    Posted Fri November 14, 2003 03:21 PM

    How can I sort documents on subnodes, where the subnodes occur more than once, e.g.


    3
    4



    1
    2




    In this example A with id 2 must be placed before 1 in the final result.

    Regards,
    Rudolf de Grijs


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Q:More challenges ;-)

    Posted Mon November 17, 2003 07:56 AM

    Hi Rudolf,

    the following XQuery will do the job:
    xquery=input()/A sort by (min(B))

    Regards

    Harald


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: Q:More challenges ;-)

    Posted Mon November 17, 2003 12:01 PM

    Thank you Harald, but I don not think that this will work.

    min(sequence) returns minimum value and sort by expects ordering expression leading to a runtime type exception (INOXQE6301).

    Kind regards,
    Rudolf


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: Q:More challenges ;-)

    Posted Tue November 18, 2003 02:46 PM

    Rudolf,

    if B is defined as an element with type xs:string, the query works as I have posted it.
    I have noticed that the query yields a runtime type exception when B is defined as xs:integer.

    Regards

    Harald


    #API-Management
    #webMethods
    #Tamino


  • 5.  RE: Q:More challenges ;-)

    Posted Tue November 18, 2003 04:18 PM

    Hi Harald,

    Does this mean that it works as designed or are we talking about a bug?

    Regards,
    Rudolf


    #Tamino
    #API-Management
    #webMethods


  • 6.  RE: Q:More challenges ;-)

    Posted Thu November 20, 2003 05:01 PM

    Hi Rudolf,

    for xs:string, it works as designed. For xs:integer, it’s a bug.

    Regards

    Harald


    #API-Management
    #Tamino
    #webMethods