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.  XQuery > Getting ancestors

    Posted Wed May 11, 2005 05:24 PM

    Hello there,

    I’m trying to accomplish the following : getting ancestors of a Node with an XQuery.

    Let’s say that I have the following structure :

    ..... 007 .....

    A Book can contain any number of Section (recursive) and a Section ends with an Article. Each Article has a unique ID (eg 007).

    I want to get the Axis/Path of ALL ancestors (Book & Section & their attributes) of an Article (given its id).
    ie : filtering out all Section which does not contain Article 007
    eg :

    007

    Is it possible with an XQuery ?

    Thanks.


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: XQuery > Getting ancestors

    Posted Thu July 07, 2005 01:52 PM

    Hi,

    I’m afraid with Tamino 4.2 it is not possible to query the ancestors of a node, since the according navigation axis is not supported.
    In the upcoming Tamino version this will change.

    Best Regards,

    Thorsten Fiebig


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: XQuery > Getting ancestors

    Posted Thu July 07, 2005 03:34 PM

    Hi MartelB

    very simple:

    { for $s in input()/Book/Section where $s//Article="001" return $s }

    Regards,

    Joachim


    #Tamino
    #webMethods
    #API-Management