Is it possible to keep both named character entities and numeric character entities in a target XML file?

Hi guys,

I am working on a process for translating XML files with double-encoded entities. Old story again and we still don't have a solution or at least I don't know if there is one.

I'm using Trados Studio 2022 and the file type I created is XML 2.

My plan is to replace all double-encoded entities with numeric character entities and keep them as numeric in the exported target file.

Additionally, all named entities should remain the same, named.

The entity settings in the file type are as seen below:
Screenshot of entity mappings settings showing a single entry. Name column reads 'nbsp', Unicode Value is '160', Read as character is checked, Write as entity is unchecked.

In the target file all entities are exported as literal characters.

Changing the setting "Write as entity" exports the entities as the same type named entities.

Do you know if there is a way to keep the entities in the target file named or numeric even if they are the same character?

Sample: 
I would like to keep   and   in the same file.



Fixed the sample
[edited by: Dimmo Petrov at 7:53 PM (GMT 0) on 27 Dec 2024]
emoji