Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] xsl:sort with nulls at end [Thread Next] RE: [xsl] xsl:sort with nulls at endTo: Date: 11/3/2008 6:20:00 PM > 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
