This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:sort problem
- From: "Danny Guindi" <Danny dot Guindi at nnu dot com>
- To: <XSL-List at lists dot mulberrytech dot com>
- Date: Mon, 8 Apr 2002 16:53:58 -0500
- Subject: [xsl] xsl:sort problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello everybody,
I am having a problem trying to use xsl:sort. Here is the XSL code giving me problems
<xsl:template match='PEOPLE'>
<xsl:for-each select='PERSON'>
<TR>
<xsl:apply-templates>
<xsl:sort select='LAST_NAME'/>
</xsl:apply-templates>
</TR>
</xsl:for-each>
</xsl:template>
<xsl:template match='PERSON'>
<TD><xsl:value-of select='FIRST_NAME'/></TD>
<TD><xsl:value-of select='LAST_NAME'/></TD>
<TD><xsl:value-of select='BIRTH_DATE'/></TD>
</xsl:template>
When I try to load my XML file I get the following error:
Keyword xsl:apply-templates may not contain xsl:sort.
I don't understand. Everywhere I look it says that xsl:sort can be contained in xsl:for-each and xsl:apply-templates. So, what's the problem?
Thanks for any help,
Danny
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list