|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl:sort with nulls at end
> The issue I have is that if the row is missing that tag, the
> sort puts that record first. Ie. Nulls come first. I need the
> nulls to come last.
> Is there a way to get around this and force the nulls to be last?
Add further sort keys:
<xsl:for-each select="*">
<xsl:sort select="empty(X)"/>
<xsl:sort select="X" order="ascending" data-type="text"/>
<xsl:sort select="empty(Y)"/>
<xsl:sort select="Y" order="descending" data-type="text"/>
<xsl:sort select="empty(Z)"/>
<xsl:sort select="Z" order="ascending" data-type="number"/>
Note that boolean false() sorts before true().
Michael Kay
http://www.saxonica.com/
|
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








