xsl-list
[Top] [All Lists]

Re: Sorting problem

2004-04-08 06:55:29
If all you want is to sort by qty then:

<xsl:for-each select="//ProductQuantity">
 <xsl:sort data-type="number" select="@pty"/>
<!--  you select list print here--> 
</xsl:for-each>

----- Original Message ----- 
From: "kanirajan nagarajan" <rknaga(_at_)yahoo(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Thursday, April 08, 2004 2:49 PM
Subject: [xsl] Sorting problem


Hi, I have a problem with sorting HTML <select>
element. Here is my select option values:

1000($59.95)
2000($109.0)
3000($155.0)
4000($201.0)
5000($500.00)
500($249.0)

Always the 500 appears at the bottom.I need to put
"500" at the top.
The values are created by concating two different
variables in the xslt. My xml is sorted and it looks
like this :

<ProductQuantity  qty="500" price="49.95"/>
<ProductQuantity  qty="1000" price="59.95"/>
<ProductQuantity  qty="2000" price="109.0"/>
<ProductQuantity  qty="3000" price="155.0"/>
<ProductQuantity  qty="4000" price="201.0"/>
<ProductQuantity  qty="5000" price="249.0"/>

 How should I go?




__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

--+------------------------------------------------------------------
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>
--+--



<Prev in Thread] Current Thread [Next in Thread>