Turn Off Tracked Changes for All Topics Via XSLT Custom Refactoring
Posted: Tue May 14, 2024 10:06 pm
Hi,
I'm trying to create a new custom refactoring operation that will add one additional step to the out-of-the-box refactoring operation "Accept all tracked changes, remove all comments and highlights".
The one additional step is to also turn off the tracked changes state in the file. I've tried to accomplish this via using the same Xpath syntax to select processing-instructions that exists in the out-of-the-box refactoring operation, for example:
However, this doesn't actually select the "oxy_options" processing-instruction. Indeed, even a blanket match="processing-instruction()" doesn't even select this processing-instruction. Is this processing-instruction removed from the DOM and is unselectable?
To test, I used Oxygen's XPath/XQuery Builder, and it selects this processing-instruction as expected:
For context, the reason why I'd also like to remove the track_changes processing-instruction on top of all the other review processing-instructions is because our translation teams report that Trados either has issues with this processing-instruction or that the presence of this processing-instruction adds additional noise to the topic.
Therefore, we'd like a single refactoring operation to remove all tracked changes, comments, and highlights, as well as turn off tracked changes in all topics across a DITA Map.
Thank you!
Daniel
I'm trying to create a new custom refactoring operation that will add one additional step to the out-of-the-box refactoring operation "Accept all tracked changes, remove all comments and highlights".
The one additional step is to also turn off the tracked changes state in the file. I've tried to accomplish this via using the same Xpath syntax to select processing-instructions that exists in the out-of-the-box refactoring operation, for example:
Code: Select all
<xsl:template match="processing-instruction()[starts-with(name(), 'oxy_options')][contains(., 'track_changes="on"')]"/>
To test, I used Oxygen's XPath/XQuery Builder, and it selects this processing-instruction as expected:
For context, the reason why I'd also like to remove the track_changes processing-instruction on top of all the other review processing-instructions is because our translation teams report that Trados either has issues with this processing-instruction or that the presence of this processing-instruction adds additional noise to the topic.
Therefore, we'd like a single refactoring operation to remove all tracked changes, comments, and highlights, as well as turn off tracked changes in all topics across a DITA Map.
Thank you!
Daniel