[xsl] XSLT: Sort Question

Subject: [xsl] XSLT: Sort Question
From: "Ragan, Mitch" <mitch.ragan@xxxxxxxxxx>
Date: Tue, 12 Feb 2002 15:00:21 -0800
Need Sort Help
Can't get to sort by quote, if I put "@date" it works fine, but "Quote" does
nothing.

XSLT:
<xsl:template name="QuoteTotals">
	 <xsl:param name="CurrentSymbol" select =
"Symbol[position()=current()]"/>
		<!--  Gets Current Symbol being worked on from above code,
not shown-->
	<xsl:apply-templates select="//Quote[@symbol=$CurrentSymbol]"
mode="Totals">
		 <xsl:sort select="//Quotes/Quote" data-type="number"
order="descending"/>
	</xsl:apply-templates>
</xsl:template>

<xsl:template match="Quote"  mode="Totals">
 	<h3>
		<xsl:value-of select="."/>
	</h3>	
</xsl:template>

XML: 
  <Quotes>
    <Quote symbol="TK" date="2001-09-30">28.40</Quote>
    <Quote symbol="TK" date="2001-10-24">26.95</Quote>
    <Quote symbol="TK" date="2001-08-07">30</Quote>
    <Quote symbol="TK" date="2001-11-11">31.125</Quote>
    <Quote symbol="TK" date="2002-02-15">38.875</Quote>
    <Quote symbol="MCDTA" date="2001-09-15">12.30</Quote>
    <Quote symbol="MCDTA" date="2001-10-15">14.95</Quote>
    <Quote symbol="MCDTA" date="2001-11-15">16.00</Quote>
    <Quote symbol="MCDTA" date="2001-12-15">24.5</Quote>
    <Quote symbol="MCDTA" date="2002-02-15">28.0</Quote>
    <Quote symbol="MSFT" date="2001-09-01">53.50</Quote>
    <Quote symbol="MSFT" date="2002-02-15">65.25</Quote>
  </Quotes>


  Mitch K. Ragan 
    Boeing Commercial Aircraft Group 
    Global Electronic Commerce 
    Senior Systems Analyst 
    Primary: 425-266-3155
    Secondary: 425-237-1735


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread