[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl:sort by element name

Subject: RE: xsl:sort by element name
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 13 Mar 2002 16:21:23 -0000
xsl sort by for each
select="/*" will select a single element, the <LLL>, so there's not much
point sorting it.

But in your sample, all the elements at the next level have the same name,
so it's hard to see what you're getting at.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> Mike Ferrando
> Sent: 13 March 2002 15:58
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  xsl:sort by element name
>
>
> Dear List,
> I am trying to sort my output nodes based on their element name.
>
> Could someone give me a hint on this one?
>
> Mike F.
>
>
> XML:
> <LLL>
>   <C1012>...C-data...</C1012>
>   <C1012>...A-data...</C1012>
>   <C1012>...B-data...</C1012>
> </LLL>
>
> Output should be:
> <LLL>
>   <C1012>...A-data...</C1012>
>   <CC1012>...B-data...</CC1012>
>   <CCC1012>...C-data...</CCC1012>
> </LLL>
>
>
> XSL:
> <xsl:template select="/">
>   <xsl:for-each select="/*">
>     <xsl:sort select="name()"/>
>       <xsl:apply-templates select="C1012"/>
>   </xsl:for-each>
> </xsl:template>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.