[Home] [By Thread] [By Date] [Recent Entries]
At 2010-03-18 13:12 +0100, Robby Pelssers wrote:
I would like to sort following strings ['BSS84/A2', 'BSS84/DG', 'BSS84'], Not with the processor I am using (Saxon). But the customer wants them sorted like So would I! What's the easiest way to accomplish this? Which processor are you using? Below is an example ... what you want is ASCIIbetical and so the default sort collation of Unicode is fine. I hope this helps. . . . . . . . . . . . Ken t:\ftemp>type robby.xsl
<?xml version="1.0" encoding="US-ASCII"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"><xsl:output method="text"/> <xsl:template match="/">
<xsl:for-each select="('BSS84/A2', 'BSS84/DG', 'BSS84')">
<xsl:sort/>
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template></xsl:stylesheet> t:\ftemp>xslt2 robby.xsl robby.xsl BSS84 BSS84/A2 BSS84/DG t:\ftemp> -- XSLT/XQuery training: San Carlos, California 2010-04-26/30 Principles of XSLT for XQuery Writers: San Francisco,CA 2010-05-03 XSLT/XQuery training: Ottawa, Canada 2010-05-10/14 XSLT/XQuery/UBL/Code List training: Trondheim,Norway 2010-06-02/11 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



