Subject: [xsl] Re: XPath to select node according to xml:lang attribute From: Philipp Kursawe <phil.kursawe@xxxxxxxxx> Date: Fri, 15 Apr 2011 18:42:13 +0200 |
Ah sorry, nevermind. Just discovered the lang() XPath function :) Cheers, Phil On Fri, Apr 15, 2011 at 6:35 PM, Philipp Kursawe <phil.kursawe@xxxxxxxxx> wrote: > Hello, > > Is there a way to select the most specific node for a set of > languages/sub-languages in XPath 1.0 prefered? > > <root> > <text id="color" xml:lang="en">colour</text> > <text id="color" xml:lang="en-us">color</text> > </root> > > 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? > > Thanks, > Phil
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath to select node accordin, Philipp Kursawe | Thread | [xsl] Re: XPath to select node acco, Philipp Kursawe |
[xsl] XPath to select node accordin, Philipp Kursawe | Date | [xsl] Select a node only if its pre, Philipp Kursawe |
Month |