Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: group and find relative Min value

From: "Anthony Jones" <Ant@------------.--->
To: NULL
Date: 6/3/2006 3:11:00 PM


"Ghena" <lastminutesud@g...> wrote in message
news:1149337162.668450.78410@u......
> I have this xsl
>
> <?xml version='1.0' encoding='utf-8' ?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output method="html"/>
> <xsl:key name="RouterList" match="Router" use="Supplier"/>
>
> <!-- Template for our root rule -->
> <xsl:template match="/">
> <xsl:apply-templates/>
> </xsl:template>
>
> <!-- Template for our "products" rule -->
> <xsl:template match="RouterList">
>
> <!--Step 2: Loop through the unique regions (the primary key) in our
> document.  -->
> <xsl:for-each
> select="//Router[generate-id(.)=generate-id(key('RouterList',Supplier))]">
>
> <!-- Sort Primary key by name in ascending order -->
>     <xsl:sort select="Supplier" order="ascending"/>
>
>     <!-- Display the region as our table header -->
>    <div style="background-color:#f2f2f2;"><xsl:value-of
> select="Supplier"/></div>
> <br/><br/>
> </xsl:for-each>
> </xsl:template>
>
> </xsl:stylesheet>
>
> it works well but I need to find the min value  for each supplier:
>
> I tryed with:   <xsl:value-of
> select="min(//Router/GroupList/Group/OutwardList/Outward/Price/Amount)"/>
>
> but is not correct
>
> But if I use
>
> <xsl:value-of
> select="//Router/GroupList/Group/OutwardList/Outward/Price/Amount"/>
>
> I display the "first" value linked to the supplier  not the min one.


There is no min function.  You could probably write one using some embedded
javascript though.





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent