Subject: RE: [xsl] Coding Optimization for big files From: "Diego, Vitiello" <VDiego@xxxxxxxxxxxxx> Date: Wed, 10 Mar 2004 18:21:46 +0200 |
Hi David, thanks for your reply. I'm sorry I was not totally clear, but I tried to semplify the example. You can be sure I need using such variables in the code :-) Let's focus only on the problem of defining a variable containing maybe 100MByte of data inside. The XSL engine fails (in term of performance) in loading and using such variables. My idea was as already described to have a logical splitting for example with a GroupId attribute to be associated to the <Gr22>s or to the <SUM> (in the second case, it means to have in input <SUM groupId='1'>, <SUM groupId='2'> etc.) but then how to define the new variables? Maybe avoiding global variables, cyclying on the GroupId present and for each of them calling a template where inside there is the definition of the variables? I'll try and let you know. If someone has more suggestions or needs clarifications can also post me in private and I'll inform everybody about good news. What I learnt right now is that I can use the "context" and write directly <contract_number> <xsl:value-of select="IMD[productdes='8'][servicecodeid='DNNUM']/fulldesc"/> </contract_number> instead of <contract_number> <xsl:value-of select="$allSUMGr22[@customer=$pIndexCustomer][@contract=$pIndexContract]/IMD[productdes='8'][servicecodeid='DNNUM']/fulldesc"/> </contract_number> right? Diego -----Original Message----- From: David Carlisle [mailto:davidc@xxxxxxxxx] Sent: 10 Mart 2004 Çar?amba 16:27 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Coding Optimization for big files > 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Coding Optimization for b, Michael Kay | Thread | Re: [xsl] Coding Optimization for b, David Carlisle |
Re: [xsl] DOM node, David Carlisle | Date | RE: [xsl] xsl search engine, Ricaud Matthieu |
Month |