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

RE: xsl:sort question

Subject: RE: xsl:sort question
From: Sripriya Venkataraman <Sripriya.Venkataraman@xxxxxxxxxxxxxxx>
Date: Fri, 26 Apr 2002 11:23:14 -0700
RE:  xsl:sort question
It works. Thanks a lot Joerg.

Thanks,
Priya

-----Original Message-----
From: Joerg Heinicke [mailto:joerg.heinicke@xxxxxx]
Sent: Friday, April 26, 2002 11:15 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  xsl:sort question


Hello Priya,

your approach is correct, but incomplete. When you sort for @WellName, 
then the nodes will be selected alphabetically. The second sort will 
only have an effect, if two nodes are equal in the first sort criteria.

What you need:

<xsl:sort select="substring(@WellName,1,1)"/>
<xsl:sort select="substring(@WellName,2)" data-type="number"/>

Regards,

Joerg

> I am not getting the above result with my XSL. What is the problem ?
> 	<xsl:template match="ANALYSISRESULTS">
> 		<xsl:variable name="wells" select="//WELL"/>
> 		<xsl:for-each select="$wells">
> 			<xsl:sort select="@WellName"/>
> 			<xsl:sort select="substring(@WellName,2)"
> data-type="number"/>
> 		 	<xsl:for-each select="@*">
> 				<xsl:value-of select="."/> <xsl:value-of
> select="$tab"/>
> 		 	</xsl:for-each>
> 		 	<xsl:value-of select="$newline"/>
> 		</xsl:for-each>
> 	</xsl:template>
> 
> Thanks,
> Priya
> X 323


 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.