|
Subject: Re: [xsl] XSL Variable not getting set From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Wed, 14 Mar 2007 16:36:17 +0100 |
This works great!:
<xsl:for-each select="1 to 12">
<xsl:variable name="p" select="."/>
<xsl:value-of select="if ($cg[@month=$p])
then $cg[@month=$p]/@cost else 0"/>
<xsl:if
test="position()!=last()">,</xsl:if>
</xsl:for-each>
I had no idea you could loop that way with XSL. Obviously, I'm a newbie at this and am still learning
a lot.
<xsl:template match="* | @*" mode="remove-null">
<xsl:copy>
<xsl:apply-templates select="* | @*" mode="#current"/>
</xsl:copy>
</xsl:template><xsl:template match="@*[.='null']" mode="remove-null">
<xsl:attribute name="{name()}" />
</xsl:template>Cheers, -- Abel Braaksma
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] XSL Variable not getting , mIchael wolff | Thread | RE: [xsl] XSL Variable not getting , Michael Kay |
| Re: [xsl] XSL Variable not getting , Abel Braaksma | Date | RE: [xsl] XSL Variable not getting , Michael Kay |
| Month |