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

RE: Sorting Upper-Case first. Microsoft bug?

Subject: RE: Sorting Upper-Case first. Microsoft bug?
From: Jeff Beadle <Jbeadle@xxxxxxxx>
Date: Tue, 5 Aug 2003 08:27:32 -0400
jeff beadle
Yago,

Here's a snippet that'll work for your example:

<xsl:template match="/">
   <recordset>
      <xsl:for-each select="recordset/row">
         <xsl:sort select="substring(@Location,1,2)" data-type="text"
order="ascending" case-order="upper-first"/>
         <xsl:sort select="substring(@Location,3)" data-type="number"
order="ascending" />
         <xsl:copy-of select="."/>
      </xsl:for-each>
   </recordset>
</xsl:template>

This is obviously not a generalized solution, but it works for your use
case.

There probably is a way to do this within a generalized approach, but off
the top of my head I can't think of any other than constructing an RTF
that'll drive the sorting or calling a custom script extension function from
within the sort element.

-Jeff

 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.