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


Subject: Performance
From: Mike Engelhart <mengelhart@xxxxxxxxxxxxx>
Date: Fri, 10 Mar 2000 10:40:39 -0600
engelhart performance
Hi -

I have a couple of simple questions regarding XSL coding "style" and it's
effect on performance.  Let's assume a DOM based API (I use Xerces right

1)  Is the above sentence an issue - are there actually noticable
performance hits for doing certain XSL actions.  I have heard using "//" to
access descendants can be a penalty but are there other obvious "things one
should avoid".  If there are, is there a list of these or documentation that
describes them anywhere.

2) I have several web pages that are being created dynamically (using
Cocoon's XSP processor).  On all of them I have the following elements in my
XML (i.e., XSP)
<time name="starttime" selected="8A"/> <!-- these time elements change -->
<time name="endtime" selected="5A"/>
<!-- followed by a list of 24 timeitems used to fill in an HTML SELECT
object - these do not change -->
  <name>6:00 am</name>
  <name>7:00 am</name>
  <name>12:00 pm</name>

Is it better for performance reasons to embed a complete list of 24
<timeitem> elements inside of each <time> element so I don't have to
backtrack in my XSL using syntax like this:
<xsl:template match="time">
    <select name="{@name}">
        <xsl:apply-templates select="../timeitem"/>

<xsl:template match="timeitem">
        <xsl:when test="../time/@selected=value">
            <option value="{value}" selected="true"><xsl:value-of
            <option value="{value}"><xsl:value-of select="name"/></option>

or should I just leave it this way and save the overhead of parsing an extra
24 <timeitem> values.

If sharing the <timeitem> elements is not a performance issue, is there any
way in XML to share all those items from one point of access as they are
really only there for display.  The <time> elements are the ones that have
the data.

Thanks for any advice.


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

Current Thread
  • Performance
    • Mike Engelhart - Fri, 10 Mar 2000 10:40:39 -0600 <=


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.