This code below is to use XML data element value in the text form editor:
<xsl:value-of select="{XML_ELEMENT}">
Ok, now I know that I can use XML value in my text editor, then I can continue with shading background color in my table cell. I have fld_Y_XML_COLOR_1 as my XML element and its value as actual color name like "lightgrey" or RGB code like "#CCCCCC" (It works both ways).
Note: I am adding if statement below to only shade with a background color when the xml value exists. If xml value has null value, you end up with blackout cells.
<?if:fld_Y_XML_COLOR_1 != ''?> <xsl:attribute xdofo:ctx="block" name="background-color"> <xsl:value-of select="fld_Y_XML_COLOR_1"/> </xsl:attribute> <?end if?>
No comments:
Post a Comment