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

Re: Creating keys depending on input parameter

Subject: Re: Creating keys depending on input parameter
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
Date: Wed, 23 Jul 2003 07:46:17 -0700 (PDT)
creating keys
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

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.