xslt order by

N

nkammah

Hi all,

I am trying to use the order-by function in a xsl transformation but I
got the error message :

the attribute 'order-by' is not valid on 'xsl:value-of'.


my code is as below :

<xsl:for-each select="ResourceLog/Tester/DateStamp/TimeStamp/Process">
<xsl:variable name="Size"><xsl:value-of select="MemUsage"
order-by="@ProcessName"/></xsl:variable>

<b><xsl:value-of select="@ProcessName"/></b> : <xsl:value-of
select="$Size div 1024"/> Mb</li>
</xsl:for-each>


and my xmlns declaration : <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

aparently, when I am using : <xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl"> it works fine ( but I cannot
use variables)

Any idea???

thanks a lot
 
A

Andy Dingley

I am trying to use the order-by function in a xsl transformation but I
got the error message :

Use <xsl:sort> instead
http://www.w3.org/TR/xslt#sorting

aparently, when I am using : <xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl"> it works fine ( but I cannot
use variables)

That's an enormously obsolete early version of XSL, so old that it was
XSL rather than XSLT
http://www.w3.org/TR/1999/WD-xsl-19990421/
XSL began as one TR that encompassed both XSLT and XSL:FO. The "XSLT"
part was also quite crude and a lot different to what it is now. Don't
use anything resembling this ancient old version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top