[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Key/Use
From: David_Marston@xxxxxxxxx
Date: Wed, 5 Sep 2001 14:31:15 -0400
The problem was originally described as:
><xsl:key name="lookup" match="row"
>  use="concat($TRANSFORMER_SourceCountry,'_layer_name')"/>
where the variable specifies a country code. After some discussion,
it came down to:
>So I guess I can not have a dynamic lookup table?

Not that way, but you could define several keys, then dynamically
pick which key:

<xsl:key name="US_lookup" match="row" use="US_layer_name"/>
<xsl:key name="ES_lookup" match="row" use="ES_layer_name"/>
<xsl:key name="CN_lookup" match="row" use="CN_layer_name"/>
<xsl:key name="BG_lookup" match="row" use="BG_layer_name"/>
then
...select=key(concat($country,'_lookup'),$value)...
Hope that helps!
.................David Marston


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • Re: Key/Use, (continued)
    • Kevin_Gutch - Wed, 5 Sep 2001 10:41:26 -0400 (EDT)
    • Kevin_Gutch - Wed, 5 Sep 2001 11:46:00 -0400 (EDT)
    • David_Marston - Wed, 5 Sep 2001 14:41:44 -0400 (EDT) <=
      • P Vikram - Wed, 5 Sep 2001 15:05:00 -0400 (EDT)
        • P Vikram - Wed, 5 Sep 2001 16:16:57 -0400 (EDT)
        • Chris Bayes - Wed, 5 Sep 2001 18:08:37 -0400 (EDT)
        • P Vikram - Wed, 5 Sep 2001 18:41:20 -0400 (EDT)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member