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

Re: Slow XSLT

Subject: Re: Slow XSLT
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Mon, 03 Mar 2008 20:44:38 +0100
Re:  Slow XSLT
Cleyton Jordan schrieb:
Hi Manfread,

I truly appreciate your help. You are real star :)

I have just seen your post and before I try your
changes I would like to ask you what this line does
i.e. which template does it call?

<xsl:apply-templates select="$set"/>

It "calls" whatever matches the contents of $set. What is in $set depends on the context. At the place you extracted this line from, a template by the name "apply-set", there is an xsl:param named "set". The template "apply-set" is indeed called (using xsl:call-template), as it is a named template. Other templates are matching templates - these go without names. They are applied to nodes (using xsl:apply-templates) based on whether or not they match.

Where is this template being called from?

<xsl:template match="Col">
  <td colspan="{$msrs}">
   <div><xsl:value-of select="@heading"/></div>
  </td>
</xsl:template>

Incidentally, it is "called", or rather applied, by the xsl:apply-templates above that has caught your intention. It may not be obvious at first glance, but it happens in recursion. See the following snippet from Manfred's example.

		<xsl:when test="$set/*">
			<xsl:call-template name="apply-set">
				<xsl:with-param name="set" select="$set/*"/>
			</xsl:call-template>
		</xsl:when>

Michael


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.