Dynamically updating XData XslFoXslt sections
I'm writing a ZEN PDF report that uses StyleCalls to modify/HiLight table cells.
Is it possible to use a ZenMethod to create the Xdata below? I need to modify the colors based on flags.
{
<xsl:template name="HighLight">
<xsl:param name="Value"/>
<xsl:if test="$Value = 0">
<xsl:attribute name='font-weight'>normal</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 1">
<xsl:attribute name='font-weight'>normal</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 2">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
<xsl:attribute name='color'>#d70825</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 3">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
<xsl:attribute name='color'>#d70825</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 4">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 5">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 6">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#71af2d</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 7">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#71af2d</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 8">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#fbb800</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 9">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#fbb800</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 10">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ef7917</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 11">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ef7917</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if> <xsl:if test="$Value = 12">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#b90064</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 13">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#b90064</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if> <xsl:if test="$Value = 14">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#472784</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 15">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#472784</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if> <xsl:if test="$Value = 16">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#05bfc4</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 17">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#05bfc4</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 18">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#86888c</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 19">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#86888c</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 20">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#50535a</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 21">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#50535a</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 22">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#11316e</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 23">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#11316e</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 24">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#d70825</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 25">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#d70825</xsl:attribute>
<xsl:attribute name='color'>#000000</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 30">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 31">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 32">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='padding-left'>10px</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 33">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='padding-left'>10px</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 34">
<xsl:attribute name='font-weight'>normal</xsl:attribute>
<xsl:attribute name='padding-left'>20px</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 35">
<xsl:attribute name='font-weight'>normal</xsl:attribute>
<xsl:attribute name='padding-left'>20px</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
</xsl:if> <xsl:if test="$Value = 36">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
<xsl:attribute name='color'>#71af2d</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 37">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
<xsl:attribute name='color'>#71af2d</xsl:attribute>
</xsl:if> <xsl:if test="$Value = 38">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
<xsl:attribute name='color'>#d70825</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 39">
<xsl:attribute name='font-weight'>bold</xsl:attribute>
<xsl:attribute name='background-color'>#dfdfdf</xsl:attribute>
<xsl:attribute name='color'>#d70825</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 40">
<xsl:attribute name='font-weight'>normal</xsl:attribute>
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 41">
<xsl:attribute name='font-weight'>normal</xsl:attribute>
<xsl:attribute name='background-color'>#fefefe</xsl:attribute>
</xsl:if>
<xsl:if test="$Value = 99">
<xsl:attribute name='background-color'>#ffffff</xsl:attribute>
</xsl:if> </xsl:template>
}