[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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


Subject: RE: [xsl] How can I create a variable with a variable access path?
From: drkm <darkman_spam@xxxxxxxx>
Date: Mon, 5 Dec 2005 15:17:51 +0100 (CET)

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[@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[@lang=$lang]"/>

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

--drkm





















	

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


Current Thread