|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] <xsl:sort> not working under Unix
Hello,
Im can't get the <xsl:sort> tag to work under Unix.
Im trying to reverse sort a list of nodes, before processing
them using the Xalan Java 1 XSLT processor.
The code i have used is detailed below and works when i try
it in DOS, but when i try it on a Unix server, it doesn't work. No errors
are produced, but the order is not reversed. Both processor versions are
identical, and the only thing that is different is the platform.
Ide really appreciate knowing why this is so? Thanks in anticipation.
The XSL and XML fragmemts are listed here...
XSL FRAG:
<!-- OUTPUT 'CHECK FOR MORE ON' KEYWORDS -->
<xsl:text>CHECK FOR MORE ON:
</xsl:text>
<xsl:for-each select="/story/nitf/head/docdata/key-list/keyword">
<xsl:sort select="position()" data-type="number" order="descending">
<xsl:variable name="alert_name" select="@key"/>
<xsl:value-of select="@key"/>
<xsl:text>http://www.someurl.com/</xsl:text>
<xsl:choose>
<xsl:when test="string-length(//category)=0">
<xsl:text>news</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/story/properties/category"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>/index.html?keywords=</xsl:text>
<xsl:value-of select="translate($alert_name, ' ', '+')"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
XML frag
...
...
<key-list>
<keyword key="Newsflash update"/>
<keyword key="UK"/>
<keyword key="Crime"/>
<keyword key="Attacks"/>
<keyword key="Race issues"/>
</key-list>
...
....
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








