Re: [xsl] Coding Optimization for big files

Subject: Re: [xsl] Coding Optimization for big files
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 10 Mar 2004 14:26:38 GMT
> But I don't be sure that I can avoid defining big variables.

It's not clear that you need define any variables at all.
Certainly therse two aren't doing anything much

			<xsl:variable name="indexCustomer" select="@customer"/>
			<xsl:variable name="indexContract"
			select="@contract"/>

You could just use @customer and @contract in the with-param.

Although actually I don't think you want to do that either, that's just
passing the two parts of your key and then you search the whole file
again looking for that:
<xsl:value-of
select="$allSUMGr22[@customer=$pIndexCustomer][@contract=$pIndexContract]/
the slow way even though you have already made a key that indexes on
this info:


	<xsl:key name="gr22CustomerContractKey" match="/TIMM-MESSAGE/SUM/Gr22" use="concat(@customer,'|',@contract)"/>


Actually I'm confused as you don't seem to be using any of the Gr22
with the same contract and customer values except the first one.


so isn't 

<xsl:value-of
select="$allSUMGr22[@customer=$pIndexCustomer][@contract=$pIndexContract]/IMD....

just a slow way of getting back to the current node, ie the above could be

<xsl:value-of select="IMD....



David

-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
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
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread