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

XPath to select node according to xml:lang attribute

Subject: XPath to select node according to xml:lang attribute
From: Philipp Kursawe <phil.kursawe@xxxxxxxxx>
Date: Fri, 15 Apr 2011 18:35:01 +0200
 XPath to select node according to xml:lang attribute

Is there a way to select the most specific node for a set of
languages/sub-languages in XPath 1.0 prefered?

<text id="color" xml:lang="en">colour</text>
<text id="color" xml:lang="en-us">color</text>

I would like selectSingleNode for "en-us", "en" and as last resort
where no xml:lang tag is specified.
My try was:
/[@id="color" and (@xml:lang="en-us" or @xml:lang="en" or not(@xml:lang))]
but that does not seem to work.

I such finer grained selection possible?


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.