XSL Sort
-
Hello all, I am rendering my page using XSL.At place I am using sorting using xsl sort.But this need to be dynamic i e user can sort by some specific fiend by his own choice. So I have to put select as dynamic which I am passing to xsl as a parameter as <code><xsl:param name="SortName" select="Name" /> <xsl:param name="SortDataType" select="text" /></code> Now I am accessing these parameter in xsl:sort tag as <code> <xsl:sort select="$SortName" data-type='{$SortDataType}'/></code> but its not working... Waiting for your reply..
-
Hello all, I am rendering my page using XSL.At place I am using sorting using xsl sort.But this need to be dynamic i e user can sort by some specific fiend by his own choice. So I have to put select as dynamic which I am passing to xsl as a parameter as <code><xsl:param name="SortName" select="Name" /> <xsl:param name="SortDataType" select="text" /></code> Now I am accessing these parameter in xsl:sort tag as <code> <xsl:sort select="$SortName" data-type='{$SortDataType}'/></code> but its not working... Waiting for your reply..
If SortName is the name of an element, try something like this:
<xsl:sort select="./\*\[name()=$SortName\]"/>
[edit]Or if SortName is the name of an attribute, then use this:
<xsl:sort select="./@\*\[name()=$SortName\]"/>
[/edit]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p