Hi,
What's the proper syntax for using math functions in XmlTemplater expressions and/or files ?
I have an RGB value that I need to split into its R, G, and B components, but I don't want to have to create 3 extra attributes for each of the 4+ color values.
I need an output like this: <Color R="red" G="green" B="blue" />
I've tried (with attribute "mapinfo_brush_foreground" as my RGB - value = 0xFFFFFE):
<Color R="@Evaluate(floor({fme:get-attribute('mapinfo_brush_foreground')}/65536))" G="floor(fmod({fme:get-attribute('mapinfo_brush_foreground')},65536)/256)" B="@Evaluate(floor(fmod(@Evaluate({fme:get-attribute('mapinfo_brush_foreground')}),256)))" />
But this yields: <Color R="" G="floor(fmod(16777214,65536)/256)" B="" />
So neither none, one, or multiple "Evaluate()" calls produces the desired result.
Please help me out in this.
And PS: it seems like such math functions are no-go when using file based templates. Is this true ?
Cheers.