[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: Integrated sort using different elements
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 19 Feb 2009 15:49:04 -0000
> > <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/

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member