Re: [xsl] Speed difference attributes vs elements

Subject: Re: [xsl] Speed difference attributes vs elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 26 Sep 2005 10:31:37 +0100
> Q1: Is there a performance penalty for either design?

Possibly but yougave no indication of what you are doing. If you arejust
listing the file, then any design is essentially equivalent. If you are
doing a transfromation, then some designs are better than others for
some kinds of transformation.

> Q2: Does the answer depend on the XSLT processor?

Fine details will depend on system optimisations etc, but broad design
doesn't usually.

In particualar if you need to process your model names individually your
eleemnt based designe is likely to be better as any xpath engine ought
to be pretty well optiomised to iterate over models/model but if your
models are a space sparated string in an attribute value, XSLT1 has
essentially no basic capability to handle those tokens and so you need
to write a recursive iteration based on substring-before, which is
likely to be a lot slower.

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread