Hi Niklas
You could write a <xsl:function/> to define the weight an use it as follows:
<xsl:value-of select="f:setWeight(number)"/>
Raffaele
-----Ursprüngliche Nachricht-----
Von: Niklas Holmberg [mailto:Niklas(_dot_)Holmberg(_at_)eniro(_dot_)com]
Gesendet: Donnerstag, 8. Juni 2006 08:25
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: [xsl] Save value in variable or param?
Hi!
I have a number of if-cases to but different values to a variable that i
want to use later but i can't get i to work. Is it even possible to do
with variable or param? Or maybe some other way?
<xsl:for-each select="root/row">
<xsl:if test="number >= 200">
<xsl:if test="number <= 299">
<xsl:param name="weight" select='"weight2"'/>
</xsl:if>
</xsl:if>
<xsl:if test="number >= 300">
<xsl:if test="number <= 399">
<xsl:param name="weight" select='"weight3"'/>
</xsl:if>
</xsl:if>
<xsl:if test="number >= 400">
<xsl:if test="number <= 499">
<xsl:param name="weight" select='"weight4"'/>
</xsl:if>
</xsl:if>
<li><xsl:attribute name="class"><xsl:value-of
select="$weight"/></xsl:attribute>hej</li>
</xsl:for-each>
Thanks!
/Niklas
Confidentiality Notice: This e-mail transmission may contain confidential
or legally privileged information that is intended only for the individual
or entity named in the e-mail address. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution, or reliance upon the contents of this e-mail is strictly
prohibited and may be unlawful. If you have received this e-mail in error,
please notify the sender immediately by return e-mail and delete all
copies of this message.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--