This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to change Sort keyword dynamicly


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]