xsl-list
[Top] [All Lists]

Re: [xsl] Integrated sort using different elements

2009-02-19 14:50:32

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/


























--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--