xsl-list
[Top] [All Lists]

RE: xsl:value-of select after evaluating the variable

2004-05-03 04:14:21
I have xml document like following...  
==========

<de>German Text</de>
<en>English Text</en>

==========
I have an variable "$lang" which can be "de" or "en".

Now I want to extract /de or /en
depending on variable $lang.

I am trying something like
 <xsl:value-of select="node($lang)"/>

But I cant get the result!!

Guessing the syntax of a programming language is not a particularly
productive strategy. Get yourself a book that introduces XSLT and XPath, and
follow the instructions.

You want select="*[name()=$lang]".

Michael Kay




<Prev in Thread] Current Thread [Next in Thread>