Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: sorting nodes >Thread Next - Re: sorting nodes Re: sorting nodesTo: NULL Date: 4/4/2008 5:13:00 PM
tshad wrote:
>>> <xsl:apply-templates select="data/form/tag | data/form/section/tag">
>>> <xsl:sort select="form/@primary" order="ascending"/>
>>> </xsl:apply-templates>/>
> Can you do 2 sorts?
>
> Sort on @primary and on ancestor::section/@number?
Yes, you simply need to use two xsl:sort elements e.g.
<xsl:apply-templates select="...">
<xsl:sort select="@primary"/>
<xsl:sort select="ancestor::section/@number"/>
</xsl:apply-templates>
that way the first xsl:sort defines the primary sort key, the second
xsl:sort the secondary sort key.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
