[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Comparison of nodes minus a child node

Subject: Re: Comparison of nodes minus a child node
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Wed, 31 Oct 2001 03:35:33 +0100
xsl minus
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.