Hello,
I'm writing a custom plugin and, to make a long story short, I want to add highlight tags to segments that originally had tracked changes in the source in sdlxliff files generated from Word documents (WordprocessingML v. 2).
I have already achieved this, and, in the process, I observed that the highlight is added like this:
<fmt-def id="30">
<value key="BackgroundColor">yellow</value>
</fmt-def>
---
<tag id="Documents.HighlightColor">
<bpt name="cf" can-hide="true" line-wrap="false" word-end="false"><cf highlight=yellow></bpt>
<bpt-props>
<value key="IsQuickTagMetaData">True</value>
<value key="w:highlight"><w:highlight w:val="yellow"/></value>
</bpt-props>
<ept name="cf" can-hide="true" line-wrap="false" word-end="false"></cf></ept>
<fmt id="30"/>
</tag>
Since I saw the word "yellow" there, I decided to give it a try with all the Word supported highlight colors:
{"Yellow", "yellow"},
{"Black", "black"},
{"Blue", "blue"},
{"Cyan", "cyan"},
{"Dark Blue", "darkBlue"},
{"Dark Cyan", "darkCyan"},
{"Dark Gray", "darkGray"},
{"Dark Green", "darkGreen"},
{"Dark Magenta", "darkMagenta"},
{"Dark Red", "darkRed"},
{"Dark Yellow", "darkYellow"},
{"Green", "green"},
{"Light Gray", "lightGray"},
{"Magenta", "magenta"},
{"Red", "red"}
When I replace the three instances of "yellow" found in the code above with any of these values, it seems to work in the editor. Here is a sample with "darkBlue":
However, the target file is always yellow, and it seems to be ignoring the value (w:val="darkBlue") of the tag.
Resulting document.xml:
I would like to know if the color is hardcoded in the WordprocessingML v. 2 file type so that I can stop trying, or if I might be doing anything wrong or overlooking anything.
Thanks a lot!
Generated Image Alt-Text
[edited by: RWS Community AI at 8:12 AM (GMT 1) on 13 Jun 2025]