[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] keys and performance
Subject: [xsl] keys and performance From: James Pasley <James.Pasley@xxxxxxxxxxxxx> Date: Fri, 27 Jul 2001 17:59:54 +0100 |
I am using XSLT to convert between two sets of values, using a "table" defined in XML and a key. Does the way the table is structured effect performance for large tables? For example, is either one of the following two structures better than the other? Or is there a better way? Version 1: used elements will the keys stored as attributes <xsl:key name="CountryCodeKey" match="csl:CountryCode/csl:value" use="@key"/> <csl:CountryCode default="Other"> <csl:value key="IE">Ireland</csl:value> <csl:value key="FR">France</csl:value> <csl:value key="NL">Netherlands</csl:value> <csl:value key="JP">Japan</csl:value> <csl:value key="AU">Australia</csl:value> </csl:CountryCode > Version 2: Uses separate elements for the keys and values <xsl:key name="CountryCodeKey" match="csl:CountryCode/csl:value" use="preceding-sibling::cs:key[1]"/> <csl:CountryCode> <csl:key>IE</csl:key> <csl:value>Ireland</csl:value> <csl:key>FR</csl:key> <csl:value>France</csl:value> <csl:key>NL</csl:key> <csl:value>Netherlands</csl:value> <csl:key>JP</csl:key> <csl:value>Japan</csl:value> <csl:key>AU</csl:key> <csl:value>Australia</csl:value> </csl:CountryCode > Thanks, James Pasley Cape Clear Software Limited. 61 Fitzwilliam Lane Dublin 2 Ireland Email : james.pasley@xxxxxxxxxxxxx Switchboard : + 353 (1) 2419900 Direct line : + 353 (1) 2419957 Fax : + 353 (1) 2419901 www : www.capeclear.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: template stack trace, Dimitre Novatchev | Thread | RE: [xsl] keys and performance, Michael Kay |
[xsl] Re: template stack trace, Dimitre Novatchev | Date | Re: [xsl] OT: ICFP 2001 (xsl soluti, David Carlisle |
Month |