Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Slow XSLT

From: Michael Ludwig <mlu@------------->
To:
Date: 3/3/2008 7:45:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent