[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: element in most preferred language expression?

Subject: Re: element in most preferred language expression?
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 28 May 2008 10:18:45 +0100
Re:  element in most preferred language expression?
2008/5/28 David Carlisle <davidc@xxxxxxxxx>:
>  title[lang($preferredLanguage)] |
> title[lang($2ndPreferredLanguage)][not(../title[lang($preferredLanguage)])]
> which will select  title[lang($preferredLanguage)] if it exists and
> title[lang($2ndPreferredLanguage)] if title[lang($preferredLanguage)]
> does not exist

or in 2.0:

(title[lang($preferredLanguage)], title[lang($2ndPreferredLanguage)])[1]

I guess in 1.0 you might be able to do a union:

(title[....] | title[2nd..)])[1]

..but if they both existed and the 2nd pref occurred first in document
order you would get that instead.

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.