|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Comparison of nodes minus a child node
Hi Matt, you don't need to wonder by such a frequently use of '//'. The transformer has to test all descendants, not only the childs, if they are matching. Imagine you have your 80.000 hierarchy-elements with all 7 childs -> 640.000 elements. And all of them the processor has to test whether they are mathcing 'ListofHierarchies'. Try to replace all '//' with a single slash '/'. The first few ones ($VAR/ListofHierarchies/Hierarchy) should cause no errors, because this is exactly the xml-structure. At the other ones I would write exactly the xml-structure too. NEVER use '//', especially in such huge files. Hope this helps to get the time back to 5 min ;-) Joerg > <xsl:if test="$TODAY_PROD//ListofHierarchies or > $YEST_PROD//ListofHierarchies"> > <xsl:variable name="TODAY_HIERS"><xsl:apply-templates select > ="$TODAY_PROD//ListofHierarchies//Hierarchy" > mode > ="hierarchy"><xsl:sort/></xsl:apply-templates></xsl:variable> > <xsl:variable name="YEST_HIERS"><xsl:apply-templates select > ="$YEST_PROD//ListofHierarchies//Hierarchy" > mode > ="hierarchy"><xsl:sort/></xsl:apply-templates></xsl:variable> > <xsl:if test="not($TODAY_HIERS=$YEST_HIERS)"> > <ListofHierarchies> > <xsl:for-each select > ="$TODAY_PROD//ListofHierarchies//Hierarchy"> > <xsl:variable name="IND_TODAY"><xsl:apply-templates > select="." mode="hierarchy"/></xsl:variable> > <xsl:if test="not($IND_TODAY > = $YEST_HIERS//Hierarchy)"> <!-- Hierarchy is an Add --> > <xsl:copy-of select = "."/> > </xsl:if> > </xsl:for-each> > <xsl:for-each select > ="$YEST_PROD//ListofHierarchies//Hierarchy"> > <xsl:variable name="IND_YEST"><xsl:apply-templates > select="." mode="hierarchy"/></xsl:variable> > <xsl:if test="not($IND_YEST > = $TODAY_HIERS//Hierarchy)"> > <xsl:apply-templates select="." mode="delete"/> > </xsl:if> > </xsl:for-each> > </ListofHierarchies> > </xsl:if> > </xsl:if> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








