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

Re: Aberrant Alphabetizing.

Subject: Re: Aberrant Alphabetizing.
From: Wendy McFarland <wendy@xxxxxxx>
Date: Fri, 7 Mar 2003 17:14:23 +0100
wendy mcfarland
On Friday, March 7, 2003, at 03:07 PM, David Carlisle wrote:

sorting is rather underspecifeed in xslt looks like your system is
sortting space after letters and you want it before.
You could try different xslt engines or use
xsl:sort select="translate(title,' ','Z')"
to sort spaces as Z (or some character that your system sorts after the
latin alphabet)


Soooo sharp, David!


Z was still being idiosyncratic:


--Effective Manning of the U.S. Merchant Fleet

--Effectiveness and Outcomes in Health Care: Proceedings of an Invitational Conference

--Effective Services for Young Children: Report of a Workshop

--Effect of Environment on Nutrient Requirements of Domestic Animals


But using a period as the translation for spaces


<xsl:template match="/">
<xsl:for-each select="/publisher/book[fld080[contains(fld080', 'Print-On-Demand')]]">
<xsl:sort select="translate(title,' ','.')"/>
<xsl:call-template name="catalog_listing"/>
</xsl:for-each>
</xsl:template>


has worked like a charm!

--Effect of Environment on Nutrient Requirements of Domestic Animals

--Effective Manning of the U.S. Merchant Fleet

--Effective Services for Young Children: Report of a Workshop

--Effectiveness and Outcomes in Health Care: Proceedings of an Invitational Conference


Thanks, also, to those who suggested trying a different processor. (Jeni was right, I use Xalan.) Sort seemed like such a BASIC thing, it wouldn't have occurred to me that implementations might vary.


I'm happy (really happy) for now, to be able to plug in David's solution.

But Jeni thought that the sort I was having trouble with might come out correctly in Saxon.

So I guess I'm wondering, in a more general way, if I should be suspicious of Xalan?

If I would I be better off switching to Saxon?


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.