[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL sheet Optimisation
> Would it be better (faster) to create keys for all the > sections and access > the particular section with it's key: > <xsl:apply-templates select="key('mykey', $id)"/> > or would it be better to do something like: > <xsl:apply-templates select="//*[@id=$id]"/> > You can only really find out by trying both and measuring them. But with Saxon, the key() solution will normally be significantly faster, provided that you are executing this code often enough to pay back the cost of building the hash table. I have heard of a case where switching to use of keys reduced the run time from 7 hours to 4 minutes; but it all depends on the data. Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|