[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Key/Use

Subject: RE: Key/Use
From: Patrick Moore <patrickm@xxxxxxxxxxx>
Date: Wed, 5 Sep 2001 12:45:05 -0700
xsl key use
If you find yourself running into these kind of XSL barriers a lot,
something to consider doing is to have a stylesheet that generates the
actual stylesheet used to process the data. You processing becomes a
two-step process but it might be what you need.

-Patrick Moore-

>-----Original Message-----
>From: Kevin_Gutch@xxxxxxxxxxx [mailto:Kevin_Gutch@xxxxxxxxxxx]
>Sent: Wednesday, September 05, 2001 11:54 AM
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject: Re:  Key/Use
>
>
>
>Yes. I guess that is what I will need to do. I just do not 
>like hard-coding
>it that way. Anytime I add country I will have to edit the 
>file. Oh well.
>I'll use it until I can get something better. I am still a little new.
>
>
>
>
>
>
>                                                               
>                                          
>                    David_Marston@xxxxxxxxx                    
>                                          
>                    Sent by:                           To:     
>xsl-list@xxxxxxxxxxxxxxxxxxxxxx           
>                    owner-xsl-list@xxxxxxxxxxxx        cc:     
>                                          
>                    rytech.com                         
>Subject:     Re:  Key/Use                    
>                                                               
>                                          
>                                                               
>                                          
>                    09/05/2001 02:31 PM                        
>                                          
>                    Please respond to xsl-list                 
>                                          
>                                                               
>                                          
>                                                               
>                                          
>
>
>
>
>
>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
>
>
>
>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.