[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] sorting with param @attribute
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|