Subject: Re: [xsl] Creating keys depending on input parameter From: Mukul Gandhi <mukulw3@xxxxxxxxx> Date: Wed, 23 Jul 2003 07:46:17 -0700 (PDT) |
Hi Bob, i guess, when you declare an instruction <xsl:key at the <xsl:stylesheet level, it is an instruction to the XSLT processor to maintain an index for the key operation. When you actually use the key() function, it returns the node-set corresponding to the arguments to key() function(at which time the processor must be consulting the <xsl:key definition). i am not sure about the internals of polular XSLT processors namely Xalan and Saxon. If the XSLT processor creates the data structures in memory to manage the key when it encounters the <xsl:key definition, then its an overhead which you are not wanting(in cases you are not using the key() function). If the processor *can* create the data structures for key operation in memory, when it *first* encounters the key() function in stylesheet, you may achieve the optimization you are desiring(i guess processors don't do that!). If you are not able to use the <xsl:key statement based on some parameter(i guess we can't), i think you will have to bear the overhead associated with using the key in your situation. Regards, Mukul --- Bob Stobie <bstobie@xxxxxxxxxx> wrote: > Hi All, > > I have an application where I use the same XSL file > in several different > ways, depending on input parameters. In one case I > would like to create > keys to access the data, but I don't want to incur > the overhead of the key > creation unless I actually need them. I would like > to control this by the > input parameters, but there doesn't seem to be any > way to do that. The key > command has to be at the stylesheet level, it can't > be in a template. On > the other hand, if and choose must be in a template, > and cannot be at the > stylesheet level. > > Anyone have any suggestions? > > Bob Stobie > bstobie@xxxxxxxxxx > > > XSL-List info and archive: > http://www.mulberrytech.com/xsl/xsl-list > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Creating keys depending o, David Carlisle | Thread | [xsl] counting preceding siblings i, John Sands |
[xsl] How to show distinct node val, Poort, J. | Date | RE: [xsl] Creating xml files, Wendell Piez |
Month |