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

RE: keys and performance

Subject: RE: keys and performance
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sun, 29 Jul 2001 08:33:50 +0100
xslt key performance
A question "is A faster than B" can only have a meaningful answer in respect
of a particular processor.

In general, a structure like <a/><b/><a/><b/>, in which relationships are
implied by adjacency, is bad news for XSLT, but you might get away with it
in this case. It's bad news because there's an object in your conceptual
model that doesn't map to an XML element, it maps to a pair of XML elements,
an a and a b.

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> James Pasley
> Sent: 27 July 2001 18:00
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  keys and performance
>
>
>
> 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
>


 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.