Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Difference between xsl:param and xsl:variable?

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 7/4/2004 4:20:00 PM

Karsten Weinert wrote:


> Can you please explain to me the difference between a xsl:param and a
> xsl:variable? Since I can assign a value to both only once, what's the
> point? A small example would help me a lot.

An XSLT processor allows (or should allow) you to pass external 
parameters to a transformation for the global <xsl:param> elements you 
have in your stylesheet. Check the documentation of your XSLT processor.
And if you have an <xsl:param> element in a named template you can call 
that template and pass a parameter in with
    <xsl:call-template name="templateName">
      <xsl:with-param name="paramName" select="xpathHere" />
    </xsl:call-template>
much like in other programming languages you declare a function with 
formal parameters and then call it with actual parameters.

A variable is just meant to store some value.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/



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