How to exclude an XML element in a certain structure but keep it as translatable in other structures?

Hi,

I'm trying to create a parser rule for a custom XML filetype in Trados Studio. I want to exclude the element <title> when it is a child element of  <infopages> and <document>. I have tried creating an Xpath rule but I don't get it to work.

Could you help me please?

Thanks!



Generated Image Alt-Text
[edited by: Trados AI at 4:35 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply Children
  • Hi Paul and Michael,

    Thanks for the advise! //INFOPAGES/DOCUMENT/TITLE did the trick!

    How about if I want to create this kind of rule for translatables but want to show them in a different color in Studio's Editor?

    Thanks for taking the time to help me!

  • No problem, glad to help.

    You can color the structure tag itself and give it an abbreviation or short name; these both will appear to the right of the segment during translation and help you identify the context of what you are translating. These settings are made in the "Edit rule" dialog box by clicking on the Edit... button next to Structure info. You can then click Add... and enter the information you want to appear in the right-hand column. In this case, I would just use "Title" for the Name, Code and Identifier field (it's short enough already) and add a description that will appear if I click on the tag and need more information. The color of the structure information is selected under "Color" (Edit button), but you can also customize the color and style of the font itself used in such segments with the Edit button next to formatting.

    Hope this helps!

  • Thank you very much! I had tried that before but for some reason I did not get it to work. But now I did!