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

Re: Which executes faster: templates with specific ma

Subject: Re: Which executes faster: templates with specific match-patterns and simple content or templates with simple match-patterns and specific content ?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Nov 2014 21:24:22 -0000
Re:  Which executes faster: templates with specific  ma
It depends. Measure it and see, and tell us what you find.

For example, it depends on what XSLT processor you are using and it depends on
what other template rules are present.

Michael Kay
Saxonica
mike@xxxxxxxxxxxx
+44 (0) 118 946 5893




On 4 Nov 2014, at 20:32, Costello, Roger L. costello@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi Folks,
>
> Which executes faster:
>
> <xsl:template match="A[@x eq 'a']/B[@y eq 'b']/C">
>        	<xsl:if test="D eq 10">...
>
> or
>
> <xsl:template match="A[@x eq 'a' ]">
>        	<xsl:if test="B[@y eq 'b']/C/D eq 10">...
>
> That is, will my program execute faster if:
>
> - I have templates with highly specific match-patterns and the templates
contain a simple if-statement
>
> or
>
> - I have templates with a simple match-patterns and the templates contain a
highly specific if-statement
>
> /Roger

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.