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

Performance Issue (if any?)

Subject: Performance Issue (if any?)
From: "Robin Samways" <rsamways@xxxxxxxxxxxx>
Date: Mon, 14 May 2001 03:45:27 -0400
makecards
Hi all,

Just wondering if there are any performance issues and/or preferred methods
of deciding when it is best to use <xsl:call-template name="whatever"> over
<xsl:template match="somenode" mode="withmode">.  In this case, I only need
to make 2 passes (so far!), so is there any difference really?

My xsl sheet looks as follows:

---------------------------------------

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:output method="xml"
              version="1.0"
              indent="yes"
              doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"
              doctype-public="-//WAPFORUM//DTD WML 1.1//EN"/>
  <xsl:template match="/">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="employeehierarchy">
    <wml>
      <card id="employees">
        <p>Employees</p>
        <p>
        <xsl:apply-templates />
        </p>
      </card>
      <xsl:apply-templates mode="makeCards"/>
    </wml>
  </xsl:template>

  <xsl:template match="employee">

    <!--Build the wml cards-->

    <!--Build the card that lists the employees-->

          <a><xsl:attribute name="href">
             <xsl:text>#</xsl:text>
             <xsl:value-of select="emplast"/>
             </xsl:attribute>
             <xsl:value-of select="emplast"/>
          </a>
             <xsl:text>, </xsl:text>
             <xsl:value-of select="empfirst"/>
             <xsl:text> </xsl:text>
             <xsl:value-of select="empmiddle"/>
          <br/>
        <xsl:for-each select="employees">
          <xsl:apply-templates />
        </xsl:for-each>
  </xsl:template>

  <!--Build the cards that list each individual employee-->

  <xsl:template match="employee" mode="makeCards">
    <xsl:for-each select="//employee">
      <card><xsl:attribute name="id">
              <xsl:value-of select="emplast"/>
            </xsl:attribute>
            <p><xsl:value-of select="emptitle"/>
               <xsl:text> </xsl:text>
               <xsl:value-of select="empfirst"/>
               <xsl:text> </xsl:text>
               <xsl:value-of select="emplast"/>
            <br/>
            </p>
            <p>Position:<br/>
               <xsl:value-of select="empposition"/>
            <br/>
            </p>
            <p>Job Description:<br/>
               <xsl:value-of select="empdescription"/>
            <br/>
            </p>
            <p>Extension:<br/>
               <xsl:value-of select="empextension"/>
            <br/>
            </p>
      </card>
    </xsl:for-each>
  </xsl:template>

</xsl:stylesheet>

------------------------------------

Would it be better or worse to use:

------------------------------------

      ...
      </card>
      <xsl:call-template name="makeCards"/>
    </wml>
    ...

 and

  ...
  <!--Build the cards that list each individual employee-->

    <xsl:template name="makeCards">
      <xsl:for-each select="//employee">
      ...

-------------------------------------

Kinda long and drawn out for a general question, but I figured it was good
to give everyone exactly what I'm looking at :).

Thanks in advance,
R.Samways


 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.