xsl-list
[Top] [All Lists]

RE: [xsl] identify lowest value within a range of elements

2006-05-26 05:54:36
Hi David

Thanks for the reply. 


   <xsl:template match="price">
   <xsl:param name="lowest" select="0"/>
   <xsl:param name="rangename" select="'default'"/>
   <xsl:copy>
   <xsl:if test="[$lowest= number(current())])">
   <xsl:attribute name="lowest" select="$rangename"/>
   </xsl:if>
   <xsl:copy-of select="node()"/>
   </xsl:copy>
   </xsl:template>

   <xsl:apply-templates select="price">
     <xsl:with-param name="rangename" select="'range1'"/>
     <xsl:with-param name="lowest" 
select="min(price[position()&lt; 5]/number(.))"/>
   </xsl:apply-templates>


This is returning the lowest price within each column and I want to return
the lowest price over all columns (within the range). I apologise if my
exaplanation was poor.

Regards.

--
Kevin


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--