Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] xpath - how to return all nodes but the node matching avalue in an arbitrary tree?

From: Joerg Heinicke <joerg.heinicke@------>
To:
Date: 5/4/2002 10:19:00 AM
Hello Robert,



I don't think that there are significant performance differences.



Your <xsl:copy-of select="@*"/> shell be a bit faster than my 
<xsl:apply-templates select="@*"/>, because the template for the 
attributes must not be searched. I use the apply-templates, because I 
can easily add a new template e.g. for a special attribute.



And <xsl:apply-templates/> is the same as <xsl:apply-templates 
select="node()"/>. I use normally the "special" version with "text()|*", 
because I don't want to copy comments or the xsl-stylesheet 
processing-instruction.



The last difference is the <xsl:if> and my predicate at 
<xsl:apply-templates>. It's maybe the same as with the attributes. 
Normally I would use a simple apply-templates and again a special template:

<xsl:template match="*[@id = $delete_id]"/>

But this is not possible with variables.



Joerg



Robert Koberg schrieb:
very cool Joerg!



Does  this have performance benefits (or negatives) over the (modified) 
standard identity template:



<xsl:template match="node()|@*">



   <xsl:if test="not(@id=$id)">
       <xsl:copy>
           <xsl:copy-of select="@*"/>
           <xsl:apply-templates/>
       </xsl:copy>
   </xsl:if>
     </xsl:template>

best,
-Rob




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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent