[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

sorting with param @attribute

Subject: sorting with param @attribute
From: "Ilyasov Jienbay" <jienbay@xxxxxxxxxxx>
Date: Sat, 19 Jan 2002 16:41:32 +0000
param attributes xml
hi,
given
<items>
<item id="1">
 <title>4</title>
 </item>
<item id="2">
 <title>3</title>
 </item>
<items>
i pass param <titile> and sort with
<xsl:param name="sort"/>
<xsl:for-each select="//item">
<xsl:sort select="*[name()=$sort]" />
<table>
<tr>
<td><xsl:value-of select="@id" /></td>
<td><xsl:value-of select="title" /></td>
<tr>
</table>
what i get is

<tr>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>1</td>
<td>4</td>
</tr>

now with the same way passed param @id how can i have it sorted by @id and get

<tr>
<td>1</td>
<td>4</td>
</tr>
<tr>
<td>2</td>
<td>3</td>
</tr>

thank you
jian

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.