Manipulating highlight color of sdlxliff

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">&lt;cf highlight=yellow&gt;</bpt>
<bpt-props>
<value key="IsQuickTagMetaData">True</value>
<value key="w:highlight">&lt;w:highlight w:val="yellow"/&gt;</value>
</bpt-props>
<ept name="cf" can-hide="true" line-wrap="false" word-end="false">&lt;/cf&gt;</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":

A split view showing 'PATIENT INFORMATION LEAFLET' with a dark blue highlight on the right and red strikethrough text 'PACKAGE LEAFLET' on the left.

However, the target file is always yellow, and it seems to be ignoring the value (w:val="darkBlue") of the tag.

Text 'PATIENT INFORMATION LEAFLET' highlighted in yellow, displayed in a Word document style.

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]
Parents Reply Children
No Data