xsl-list
[Top] [All Lists]

Re: Variables

2004-07-13 06:01:08


Afterall the number of loops in here is the same as the number
of vars...

the cost of a loop is not the loop so much rather the cost of finding
teh nodes, so (in any of the versions) istead of repeatedly going

<xsl;for-each select="/a/b/c/d/e/f/"

go <xsl:variable name="x" select="/a/b/c/d/e/f/" />

<xsl:for-each select="$x"/>

that way you onlyneed do teh search once. (Actually some xslt systems
may spot the same xpath being used more than once and do this
optimisation automatically.

Alternatively you can use a key

david

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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
________________________________________________________________________


<Prev in Thread] Current Thread [Next in Thread>