Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Can templates be invoked based on the value of a variable?

From: Michael Ludwig <mlu@------------->
To:
Date: 4/2/2009 4:58:00 PM
pilgrim cnonline.net schrieb:



New question:  Is there any execution efficiency advantage between
using "child::*"  or  "element()"?

These are not only equivalent, but identical regarding their semantics,
and *should* boil down to exactly the same binary instruction set:

    <xsl:apply-templates select="*"/>
    <xsl:apply-templates select="child::*"/>
    <xsl:apply-templates select="element()"/>
    <xsl:apply-templates select="child::element()"/>

But I'm not an implementor, so I have no idea.



Execution efficiency is always processor dependent. What leads to
good execution in one processor doesn't have to do so in another.
If you want to find out, install various processors and collect some
empirical data.

Doing this for a couple of well-understood test-cases and a couple of
processors, you'll get a feeling for what's efficient and what isn't,
and how processors vary.

In general, I've found <xsl:key> very versatile and useful in order
to allow both cleaner code and faster execution.

Michael Ludwig


transparent
Print
Mail
Like It
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