>
> The version 1 will work and the version 2 will not sort
> the data, even
> though I think that these two are logically equivalent.
> Please let me know what you think? Thanks in advance!!
>
> **Version 2 - output the sorted last name**
> <xsl:template match="/addressbook/address">
> <xsl:for-each select=".">
> <xsl:sort select="name/last-name"/>
> <p>
> <xsl:value-of select="name/last-name"/>
> </p>
> </xsl:for-each>
> </xsl:template>
>
<xsl:for-each select="."> selects a single node and then sorts it, which
isn't a very useful thing to do.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|