[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Theory question about keys (no code)
On Mon, 2012-08-06 at 17:16 +0000, FAIR, ED wrote: > My question is: when is the associative array built? Is it built > entirely in the beginning, as the source document is first read into > memory? Or is it built incrementally, as each template is matched > during transformation? > > FWIW, I am using xslt 1.0, xsltproc in Solaris 10: It depends on the implementation: most likely before matching any templates, but in any case before it's first used. However, an implementation is free not to pre-compute key values but to search the whole document each time you try to fetch a nodelist by key value. If performance is an issue you might also want to compare with running a recent version of Saxon (which I think builds the keys as it reads the XML input, along with a table for optimizing "//"). Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|