Re: [xsl] Integrated sort using different elements

Subject: Re: [xsl] Integrated sort using different elements
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Thu, 19 Feb 2009 19:50:04 +0000 (GMT)
G. Ken Holman wrote:

> <xsl:sort select="( monogr/author[normalize-space(.)],
>                     analytic/author[normalize-space(.)],
>                     monogr/editor[normalize-space(.)],
>                     monogr/title[normalize-space(.)] )[1]"/>

  Of course that's a mater of taste, but when the same predicates apply to all
items in a sequence, I usually prefer:

    <xsl:sort select="( monogr/author,
                        analytic/author,
                        monogr/editor,
                        monogr/title )[normalize-space(.)][1]"/>

  Regards,

--
Florent Georges
http://www.fgeorges.org/

Current Thread