Subject:Joining 2 documents lasts too long Author:Stefan Fritz Date:25 Jul 2005 03:32 AM
Hello,
I'm trying to join 2 XML documents via XSLT.
1. documents contains product information and the 2nd document contains the prices for each product.
The problem is that the prices.xml file is a 3MB file and the products.xml contains about 500 product entries.
It takes about 90 seconds to transform on my machine.
I'm looking for away to reduce the time and would appreciate any input from the XSL gurus. :-)
<!-- only run thi stemplate if the PNR element contains a number-->
<xsl:template match="line[number(PNr)=number(PNr)]">
<xsl:variable name="selector" select="./PNr"/>
<xsl:variable name="priceline" select="$prices/txt2xml/line[PNr=$selector]"/>
Subject:Joining 2 documents lasts too long Author:Tony Lavinio Date:15 Aug 2005 11:37 AM
1. Use the XSLT Profiler to determine exactly where the slowdown is.
2. Most likely, using a key will speed the join.
See http://www.w3.org/TR/xslt#key