Re: [xsl] xsl:sort with XSLT 2.0 translated to XSLT 1.0

Subject: Re: [xsl] xsl:sort with XSLT 2.0 translated to XSLT 1.0
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 19 Jun 2008 14:44:52 +0100
2008/6/19 David Carlisle <davidc@xxxxxxxxx>:
>
>> What's wrong with:
>>
>> (@bar | @baz)[1]
>
> it would sort on (fr each item) either baz or bar with no specification
> of which is chosen.

Ahh good point - if both are present either could be used, as document
order can't be relied on (bad idea anyway)

> (@bar|self::*[not(@bar)]/@baz)[1]
>
> does the job.

Or just

@bar | @baz[not(../bar)]

?


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread