|
Subject: [xsl] xsl sort: using element attribute as sort key! From: "Adam J Knight" <adam@xxxxxxxxxxxxxxxxx> Date: Mon, 18 Apr 2005 10:28:33 +1000 |
Hi all,
I am trying to sort based on an elements attribute. Doesn't seem to work.
Can i do this, and if so, what am i doing wrong?
Replies greatly appreciated!
$sort parameter = 'name'
$dir parameter = 'descending'
xml structure:
<dfile>
<df_data_row>
<df_data column='name'>Value</df_data>
</df_data_row>
<df_data_row>
<df_data column='phone'>Value2</df_data>
</df_data_row>
</dfile>
<xsl:if test="$sort">
<xsl:apply-templates select="dfile/df_data_row">
<xsl:sort select="df_data/@column = $sort" order="$dir"></xsl:sort>
</xsl:apply-templates>
</xsl:if>
Cheers,
Adam
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Measuring the complexity , Pawson, David | Thread | Re: [xsl] xsl sort: using element a, omprakash . v |
| Re: [xsl] Measuring the complexity , M. David Peterson | Date | Re: [xsl] Measuring the complexity , Mukul Gandhi |
| Month |