This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to change Sort keyword dynamicly
- To: "xsl-list at lists dot mulberrytech dot com" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] How to change Sort keyword dynamicly
- From: HeHangjun <sameulhe at 163 dot net>
- Date: Sat, 19 May 2001 13:18:45 +0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Dear all,
I have xslt dou like this:
<xsl:template match="catalog" >
<xsl:param name="sortField" select="node(//title)"/>
<h2><xsl:value-of select="$sortField"/></h2>
<h2>Titles Grouped by Genre</h2>
<xsl:for-each select="book">
<xsl:sort select="$sortField"/>
<table border="0" width="75%">
<tr>
<th width="10%" align="right">Title</th>
<td width="90%" align="left"><xsl:value-of select="title" /></td>
</tr>
<tr>
<th width="10%" align="right">Author</th>
<td width="90%" align="left"><xsl:value-of select="author" /></td>
</tr>
</table>
<hr width="75%" align="left"/>
</xsl:for-each>
</xsl:template>
I wanna the sort keyword can changed when the param changed,but above document failed,who can help me to handle it?
Thanks.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list