xsl-list
[Top] [All Lists]

Re: sending a parameter from cmd line to template match

2003-07-28 23:56:53

Hi Adriaan,

Variables aren't allowed in a match. This is to prevent circular
definitions.
You can use the external param in the select of the apply-templates or pass
it as a param to any template though.

Greetings René
   {@   @}
        ^
      \_/

"You don't need eyes to see, you need vision!"

TJIP PCL
Steenovenweg 3
5708 HN  Helmond
The Netherlands
tel: +31(0) 492 502 222
fax: +31(0) 492 502 299
e-mail: R(_dot_)deVries(_at_)tjip(_dot_)com
internet: www.tjip.com

***************************DISCLAIMER********************************
Deze e-mail is uitsluitend bestemd voor de geadresseerde(n).
Verstrekking aan en gebruik door anderen is niet toegestaan.
TJIP PCL sluit iedere aansprakelijkheid uit die voortvloeit uit
elektronische verzending.

This e-mail is intended exclusively for the addressee(s), and may
not be passed on to, or made available for use by any person
other than the addressee(s). TJIP PCL rules out any and every liability
resulting from any electronic transmission.


                                                                                
                                                         
                    Adriaan Woerléé                                             
                                                         
                    <ade(_at_)ip9(_dot_)org>                      To:     
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com                                
           
                    Sent by:                           cc:                      
                                                         
                    owner-xsl-list(_at_)lists(_dot_)mulber        Subject:     
[xsl] sending a parameter from cmd line to template match            
                    rytech.com                                                  
                                                         
                                                                                
                                                         
                                                                                
                                                         
                    29-07-2003 08:50                                            
                                                         
                    Please respond to xsl-list                                  
                                                         
                                                                                
                                                         
                                                                                
                                                         




Hi,
    I wanted to send an external paramater to the the template to create
dynamic matching

           <xsl:param name="element" select="'default'"/>
           <xsl:template match="{$element}">

but I get a TransformerException Error : illegal tokens $

is there a better way to dynamically populate the 'match' attribute of
template??

cheers

-Ade

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






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



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