Subject: [xsl] Re: keys fast for lookups? attribute-value template in xsl:call-template? From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Fri, 3 Aug 2001 21:18:28 -0700 (PDT) |
Mike Lamb wrote: [snip] -- David Marstone provided an excellent explanation for the first question. > Second problem is that, after I retrieve the dealercode, I need to run a > dealer specific template. I had tried to do this using xsl:call-templates as > follows: > <xsl:call-template name="DEALER{$DEALERCODE}"/> > > with no success. Looks like the name attribute of xsl:call-template does > not expect an attribute-value template. Any thoughts on how I might get this > done? I am trying to avoid writing the huge switch statement over > dealercode. You cannot pass/have the name of the xsl:call-template in a variable to be dynamically established -- this is because a QName must be specified and QNames are just literal strings (static). However, you can use a generic template -- the idea behind generic templates is exactly to be able to dynamically instantiate a template, which is not known (even may not be written yet) at the time of writing the generic template. Useful examples of generic templates may be downloaded at: http://www.vbxml.com/downloads/default.asp?id=v2001611171627 This download contains four generic templates: min(), max(), binSearch(), sort(). Another generic template -- for multipass processing was posted in this list: http://sources.redhat.com/ml/xsl-list/2001-06/msg01147.html A detaled explanation of generic templates can be found at: http://lists.fourthought.com/pipermail/exslt/2001-May/000169.html and in some of my replies to questions in this list. Hope this helped. Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] keys fast for lookups? at, Dimitre Novatchev | Thread | [xsl] reverse() template (Was: RE: , Dimitre Novatchev |
Re: [xsl] keys fast for lookups? at, David_Marston | Date | [xsl] reverse() template (Was: RE: , Dimitre Novatchev |
Month |