xsl-list
[Top] [All Lists]

RE: How can I create a variable with a variable access path?

2005-12-05 07:17:51
Ragulf Pickaxe wrote:

Hi Ferdinand,

Is there any easy way of making it work other than
creating a complete
choose/when/ with static language selection?

Use:
<xsl:value-of
    select="$AllTexts/*[name()=$language]/searchButton"/>

  Or, if the dictionary language is not fixed:

    <dico lang="de">
      <entry>bla-bla</entry>
      ...
    </dico>

    <xsl:value-of select="../dico[(_at_)lang=$lang]/..."/>

  BTW, I use something similar, but I use a top-level variable for the
dictionary, rather than (or in addition) to the language:

    <xsl:variable name="lang" select="'fr'"/>
    <xsl:variable name="dico"
                  select=".../dico[(_at_)lang=$lang]"/>

    <xsl:value-of select="$dico/..."/>

--drkm





















        

        
                
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--