xsl-list
[Top] [All Lists]

Choosing different sorts

2004-07-14 23:31:00
I had a look in the archives before posting, and am
not sure I understand the method which uses:

<xsl:sort select="*[name(.) = $sortfield]"/>

I have tried, in my code to have:

  <xsl:for-each select="file">
     <xsl:choose>
        <xsl:when test="$sort='design'"><xsl:sort
select="name"/></xsl:when>
        <xsl:when test="$sort='stat'"><xsl:sort
select="status"/></xsl:when>
        <xsl:otherwise><xsl:sort select="id"/></xsl:otherwise>         

      </xsl:choose>

where $sort is a parameter passed in (via another web page).
(NB: the actual select fields are quite long path strings...)

but this is clearly wrong!

Any guidance on this area would be welcome.

Thanks
Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.



<Prev in Thread] Current Thread [Next in Thread>