p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

xslt thread: XSLT: Sorting based on count


Message #1 by "Tittle" <jtittle@p...> on Thu, 5 Sep 2002 13:14:21 +0530
Thank you Michael,

This worked.

Sorry for giving so much irrelevant detail, will certainly take care in
future :)


-----Original Message-----
From: Michael Kay [mailto:michael.h.kay@n...]
Sent: Friday, September 06, 2002 2:20 AM
To: P2P_XSLT
Subject: [xslt] RE: XSLT: Sorting based on count


>
> The below one is tree view.
> Please tell me through XSL how can i sort the Equipment which
> have atleast a <Equipments> element under them first.
>
I'm afraid I can't possibly wade through all this detail, and I don't
think that doing so would help me understand your question.

You can do

<xsl:apply-templates select="Equipment">
  <xsl:sort select="count(Equipments)" data-type="number"
order="descending"/>
</xsl:apply-templates>

Does that help? If not, please try to construct a simpler example of the
input and output that you want.

Michael Kay
Software AG
home: Michael.H.Kay@n...
work: Michael.Kay@s...


---
In developing the .NET Framework Microsoft has
taken XML to heart, and with ASP.NET representing
the cutting edge of Windows based web development,
Professional ASP.NET XML with C# has been published
to help web developers to appreciate how these
technologies can work together to provide
functional, powerful applications.
http://www.wrox.com/acon11.asp?ISBN=1861007345


  Return to Index