Project

Profile

Help

Support #4577 ยป sort.xsl

Ken Holman, 2020-06-06 02:16

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xsd"
version="2.0">

<xsl:output method="text"/>
<xsl:template match="/">
<xsl:variable name="strings" as="xsd:string*"
select="('Request For Tender Line','Requested Tender Total',
'Order Reference', 'Ordered Shipment',
'Invoice Line', 'ISPS Requirements', 'Item',
'Tender Result', 'Tendered Project',
'Transportation Segment', 'Transport Schedule')"/>
<xsl:text>Unicode order&#xa;&#xa;</xsl:text>
<xsl:for-each select="$strings">
<xsl:sort/>
<xsl:value-of select="."/><xsl:text>&#xa;</xsl:text>
</xsl:for-each>
<xsl:text>&#xa;Collation order </xsl:text>
<xsl:text>http://saxon.sf.net/collation?lang=en&#xa;&#xa;</xsl:text>
<xsl:for-each select="$strings">
<xsl:sort
default-collation="http://saxon.sf.net/collation?lang=en"/>
<xsl:value-of select="."/><xsl:text>&#xa;</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
    (1-1/1)