Subject: Re: [xsl] keys fast for lookups? attribute-value template in xsl:call-template? From: David_Marston@xxxxxxxxx Date: Fri, 3 Aug 2001 22:12:44 -0400 |
Mike Lamb writes: >I had thought of using a key over this document to perform the lookup. >My xsl is: > <xsl:key name="ziptodealer" match="ZIP" use="@zip"/> >... >This works fine, but as performance is really important here I would >like some feedback about whether this is absolutely the fastest way to >get this done. General Principle: keys were designed so as to allow developers the maximum potential for optimization. If anything can be tweaked for good performance, keys should be it. Lesser Principle: since "lazy evaluation" is an optimization tactic, assume that you don't get a payoff until you look up a given value more than once. If each zip is looked up once, you may not benefit. Real-world answer: measure performance in your environment unless you have clear-cut knowledge of how the Lesser Principle applies to you. >Looks like the name attribute of xsl:call-template does not expect an >attribute-value template. That's correct. >Any thoughts on how I might get this done? I am trying to avoid writing >the huge switch statement over dealercode. Look in the FAQ for some tricks. Also, look for commonalities among dealers (to share templates) or ways to throw more parameters at the template. Use more keys on dealercode to set parameter values. .................David Marston XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] difficulties with exclude, Michael Kay | Thread | RE: [xsl] keys fast for lookups? at, Dimitre Novatchev |
Re: [xsl] Subject line of my previo, Christopher R. Maden | Date | [xsl] Re: keys fast for lookups? at, Dimitre Novatchev |
Month |