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

RE: xsl:call-template & performance?

Subject: RE: xsl:call-template & performance?
From: "Hillyard, Matthew" <matthew.hillyard@xxxxxxxxxx>
Date: Thu, 21 Dec 2000 19:02:00 -0000
nested xsl call template
Having matched an important first child node of the root, my document tree
can then descend through any one of 35 possible permutations of an 8-level
hierarchy, which is not only unpredictable from document to document, but
which can even alter mid-document, i.e. all levels inbetween top & bottom
are optional:

the important root child node can spawn:
 3 possible child nodes, which can spawn 
  6 possible child nodes, which can spawn
   8 possible child nodes, which can spawn
    8 possible child nodes, which can spawn
     6 possible child nodes, which can spawn
      3 possible child nodes, which can spawn
       1 possible child node

My stylesheet currently consists of 35 relatively nested <xsl:for-each>
loops cascading out of one large main <xsl:template> for that first
important root child, and is that way because the formatting of content
depends variously on the depth reached by each descendant and its relative
ancestry.

So given that, say, certain titles require a certain
font/size/colour/alignment, would it be more efficient to set that
transformation in a named template before the one large main template, and
instantiate it as necessary with <xsl:call-template>, or would it be more
efficient to simply repeat the particular font/size/colour/alignment
transformation *in full* at each node where it is required??

I'm using MSXML3. Perhaps I should just conduct my own performance tests and
let the List know...!

> ----------
> From: 	Mike Brown[SMTP:mike@xxxxxxxx]
> 
	[...]

> Or did you mean to ask about the relative advantages of having templates
> that match various nodes and letting the processor navigate the source
> tree via apply-templates, vs the approach of making one big template that
> matches just the root node, occasionally calling named templates to do
> repetitive tasks? I haven't found any persuasive performance stats one
> way or the other to argue a case on that basis alone.
> 
>    - Mike
> ____________________________________________________________________
> Mike J. Brown, software engineer at            My XML/XSL resources: 
> webb.net in Denver, Colorado, USA              http://skew.org/xml/


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity
to whom they are addressed.  If you have received this email in error please notify the system manager.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 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.