xsl-list
[Top] [All Lists]

RE: [xsl] Integrated sort using different elements

2009-02-19 10:49:31

<xsl:sort select="
   monogr/author |
   self::*[not(monogr/author)]/analytic/author |
   self::*[not(monogr/author | analytic/author)]/monogr/editor |
   self::*[not(monogr/author | analytic/author | 
monogr/editor)]/monogr/title"/>

I think for XSLT 1.0 you can simplify that select to:

<xsl:sort select="(monogr/author|analytic/author)[1]"/>


I don't think so. That will select the first in document order, not the
first in the order of precedence defined in the requirement statement.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
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>
--~--