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

RE: sort by attribute text

Subject: RE: sort by attribute text
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 26 Mar 2002 19:08:39 -0000
attribute text
Nothing wrong with your sort specification, but
<xsl:for-each select=".">
will always iterate over a single node, so there's not much point in sorting
it.

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: 26 March 2002 17:42
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  sort by attribute text
>
>
> Dear Friends,
> I am suffering from a long night with my 5 year old who has strep.
> Can someone have mercy on me and help me out with this dumb-dumb
> question?
>
> I just want to sort the elements of different names with different
> attribute names by a substring in the attribute text (a number).
>
> code below
>
> thanks,
> Mike F.
>
> My XSL:
> <xsl:template match="*">
>  <xsl:for-each select=".">
>   <xsl:sort select="@*[substring-after(., 'rr_target_2')]"
> data-type="number"/>
>  </xsl:for-each>
> </xsl:template>
>
> My XML:
> <C ID="rr_target2_33">data...</C>
> <C ID="rr_target2_34">data...</C>
> <R TAR="rr_target2_33">data...</R>
> <R TAR="rr_target2_34">data...</R>
>
> What I would like in my output:
> <C ID="rr_target2_33">data...</C>
> <R TAR="rr_target2_33">data...</R>
> <C ID="rr_target2_34">data...</C>
> <R TAR="rr_target2_34">data...</R>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards.
> http://movies.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.