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.  following-sibling

    Posted Mon January 02, 2006 10:51 AM

    HI,
    I need a query with the missing following-sibling axis.

    I need the “elem” element by the name of the “ann” element
    [/code]


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: following-sibling

    Posted Mon January 02, 2006 11:55 AM

    Hi,

    yes, it is true that the following-sibling acis is not supported in Tamino 4.4.
    Still, most things this axis is used for should be possible without it.
    However, I do not understand what you are trying to do.
    If you need to find the “elem” element that is a child of an “ann” element
    with a certain name, this is acchieved by ann[attname=“attvalue”]/elem.
    Please elaborate.

    Regards,
    Juliane.


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: following-sibling

    Posted Mon January 02, 2006 12:10 PM

    The problem is that the element is not a child but the next element.

    I need the element between the 2 ann elements with the attribute name=test


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: following-sibling

    Posted Mon January 02, 2006 12:20 PM

    Ah, yes, now I see.

    You can get the position of the "ann " element and then access the
    element having the following position:

    let $ann := ann[name=“test”]
    let $parent := $ann/…
    let $siblings := $parent/*
    let $position := for $sibling at $i in $siblings
    return if ($ann[name=“test”] then $i else ()
    return $parent/*[$position + 1]

    Juliane.


    #API-Management
    #webMethods
    #Tamino