-
Hi @pgundlach , I am trying to create some global variables to handle the colors in the I have my global variables in the header, since is not working with my personal colors, I tried with the default ones, but the result did not change, colors aren't displayed. My test variables (not used at the same time):
My code: [...]
<Tr valign="middle" minheight="8mm">
<Td>
<Box height="8mm" width="4mm" graphic="tableedgeleft" />
</Td>
<Td padding-right="1mm" padding-bottom="-3pt" background-color="$title-bar-color">
<Paragraph>
<B>
<Value select="upper-case(@title)" />
</B>
</Paragraph>
</Td>
<Message select="concat('BAR1: ',$title-bar-color)" />
[...] The warning: But the message is read: What am I doing wrong this time? 😩Thanks... 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
<SetVariable variable="title-bar-color" select="blue" />
<SetVariable variable="title-bar-color" select="'blue'" /> the first line will not work, as you select the value of the element When you use <DefineColor name="$title-bar-color" ...> which I assume you did not do. You need to use curly braces as described in the manual. It jumps into XPath mode and evaluates the expression, in this case it is a variable reference (getting the contents of the variable with the name In the case of <Message select="concat('BAR1: ',$title-bar-color)" /> the XPath expression is evaluated by using select. There are two cases
This is why the error message is Solution: <Td padding-right="1mm" padding-bottom="-3pt" background-color="{$title-bar-color}"> (untested) |
Beta Was this translation helpful? Give feedback.
the first line will not work, as you select the value of the element
blue
. The second works since you select the string"blue"
.When you use
background-color="$title-bar-color"
you explicitly ask for the color named$title-bar-color
which could be defined withwhich I assume you did not do.
You need to use curly braces as described in the manual. It jumps into XPath mode and evaluates the expression, in this case it is a variable reference (getting the contents of the variable with the name
title-bar-color
).In the case of