This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Minimum value
- From: Mike Brown <mike at skew dot org>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 20 Sep 2002 16:14:31 -0600 (MDT)
- Subject: Re: [xsl] Minimum value
- Reply-to: xsl-list at lists dot mulberrytech dot com
Avula, Raj wrote:
> My xml is like this...
>
> <a>
> <value>34</value>
> </a>
> <a>
> <value>23</value>
> </a>
> <a>
> <value>56</value>
> </a>
> <a>
> <value>22</value>
> </a>
>
> Is there a way to find out the "minimum" of "value" with out using xsl:sort
> function?
Marrow provided the answer, but just out of curiosity,
why would you not want to use xsl:sort?
> is there a way in which I can form a string like 34:23:56:22: using xsl?
<xsl:variable name="series">
<xsl:for-each select="a/value">
<xsl:value-of select="concat(.,':')"/>
</xsl:for-each>
</xsl:variable>
You can then use the $series result tree fragment in expressions as if it were
a string. If you need an actual string, use a new variable:
<xsl:variable name="seriesString" select="string($series)"/>
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list