[xslt] xsl:sort limitation



LibXSLT's xsl:sort implementation only seems able to handle 4 sorting criteria.

I'm working on a stylesheet to generate a bibliography, and when I do

<xsl:for-each select="book">
	<xsl:sort select="author/last_name"/>
	<xsl:sort select="author/first_name"/>
	<xsl:sort select="author/middle_name"/>
	<xsl:sort select="title"/>
	<xsl:do-stuff/>
</xsl:for-each>

it works just fine, but if I add one more criterion, like so:

<xsl:for-each select="book">
	<xsl:sort select="author/last_name"/>
	<xsl:sort select="author/first_name"/>
	<xsl:sort select="author/middle_name"/>
	<xsl:sort select="title"/>
	<xsl:sort select="publisher"/>
	<xsl:do-stuff/>
</xsl:for-each>

it doesn't sort at all.  Is this a known limitation?  Also might it be better to sort by the first four criteria, and just ignore the extras if there's no other way around it? 

Cheers,
Cliff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]