xsl-list
[Top] [All Lists]

RE: setting params

2004-06-03 01:14:37
Hi,
where is the difference between:
<xsl:param name="paramname" select="'paramvalue'"/>
<xsl:param name="paramname">paramvalue</xsl:param>


The first is a string, the second is a result tree fragment.

If you use this RTF in a context where a string is expected, you will get
the same result. However, an RTF probably carries more overhead (depending
on the implementation, of course)

The main observable difference between a string and this RTF is the effect
of boolean(). Converting a string to a boolean gives true unless the string
is empty. Converting an RTF to a boolean always gives true.

Michael Kay




<Prev in Thread] Current Thread [Next in Thread>