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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Sorting a list

    Posted 01/18/05 03:21 AM

    I’m trying to sort a list but i’m having problems.

    I have a XSLT file that creates a table…this is its code:





    <xsl:call-template name=“get_position”>
    <xsl:with-param name=“param1” select=“$param1”/>
    </xsl:call-template>



    So, I have another XSLT file that has the template “get_position” and this is its code:

    <xsl:template name=“get_position”>
    <xsl:param name=“param1”/>
    <xsl:for-each select=“/test/[ParamID=$param1]/positions”>


    <xsl:value-of select=“($param1)/@position”/>


    </xsl:for-each>
    </xsl:template>

    What I have to do to sort the values depending of the position…??

    Thanks!


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Sorting a list

    Posted 01/18/05 11:26 AM

    Hello there,

    You can sort members of an iteration using xsl:sort tag.

    eg :

    <xsl:for-each select=“/test/[ParamID=$param1]/positions”>
    <xsl:sort select=“.” type=“number” />



    </xsl:for-each>

    However, it seems that you want to sort data of the parameter ($param1), but you don’t iterate over $param1.

    You might need to refactor your XSL in order to perform a sort.

    Cheers.

    Bertrand Martel
    Software AG France


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Sorting a list

    Posted 01/18/05 05:16 PM

    Hi

    Do you have a small sample input file?

    Cheers
    Uli


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: Sorting a list

    Posted 01/18/05 06:13 PM

    Hi!

    Ok, maybe I did not put the correct code, so what I wanted to explain was that how can I sort the list of values if these values were created in the other file.

    So, I need an example of how to sort a list using xls:call-template ???

    Thanks again!


    #API-Management
    #webMethods
    #Tamino


  • 5.  RE: Sorting a list

    Posted 01/18/05 08:33 PM

    Hi!

    Thanks for everybody, I could fix my problem, I could sort my list…!!!


    #webMethods
    #Tamino
    #API-Management