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

Re: Can templates be invoked based on the value of a

Subject: Re: Can templates be invoked based on the value of a variable?
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Thu, 02 Apr 2009 18:57:53 +0200
Re:  Can templates be invoked based on the value of a
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

Current Thread


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.
First Name
Last Name
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.