xsl-list
[Top] [All Lists]

Re: Aberrant Alphabetizing.

2003-03-07 09:14:23
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



<Prev in Thread] Current Thread [Next in Thread>