Hello,
I'm new to XML, so forgive me if this seems dumb!!
I'm trying to build a table using values from my XML file with alternating row background colors. I've tried:
<xslaram name="skip" select="1"/>
<xsl:for-each select="dept">
<TR><xsl:attribute name="bgcolor">
<xsl:if test="$skip=1">
#ffffff
</xsl:if>
<xsl:if test="$skip=0">
#f0f0fd
</xsl:if>
</xsl:attribute>
<xsl:if test="$skip=1">
<xsl:with-param name="skip" select="0"/>
</xsl:if>
<xsl:if test="$skip=0">
<xsl:with-param name="skip" select="1"/>
</xsl:if>
etc
but Saxon tells me I can't use 'with-param' from within an 'if' node. I tried using 'when' and 'otherwise' instead of an if, but got the same error.
Can anyone help? C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
If this post was useful to you, click the link below
I'm new to XML, so forgive me if this seems dumb!!
I'm trying to build a table using values from my XML file with alternating row background colors. I've tried:
<xslaram name="skip" select="1"/>
<xsl:for-each select="dept">
<TR><xsl:attribute name="bgcolor">
<xsl:if test="$skip=1">
#ffffff
</xsl:if>
<xsl:if test="$skip=0">
#f0f0fd
</xsl:if>
</xsl:attribute>
<xsl:if test="$skip=1">
<xsl:with-param name="skip" select="0"/>
</xsl:if>
<xsl:if test="$skip=0">
<xsl:with-param name="skip" select="1"/>
</xsl:if>
etc
but Saxon tells me I can't use 'with-param' from within an 'if' node. I tried using 'when' and 'otherwise' instead of an if, but got the same error.
Can anyone help? C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
If this post was useful to you, click the link below