Cannot get content between square brackets in XML file to be processed as embedded content

Hello folks,

I have an XML file in which there is content between square brackets, which I don't want to appear in the editor (or at least be converted to tags).

Here's what the XML looks like:

<?xml version="1.0" encoding="UTF-8"?>
<nodes>
<node name="XXXX1">
    <entry key="description">
[table id=34096]
    [row id=34345054]
        [cell id=3458659][b]lorem ipsum[/b][/cell]
        [cell id=4564567][b]lorem ipsum 2[/b][/cell]
        [cell id=3458936][b]Lorem ipsum 3[/b][/cell]
    [/row]
[/table]
</entry>
  </node>
  </nodes>

This is my first time trying this out so I tried to follow Paul's procedure from this topic but to no avail so far. Here's what I did:

- Create a new embedded file type processor by copying the Plain Text embedded content file, and adding the opening and ending regexp rules for the brackets:

Trados Studio screenshot showing the embedded content file type settings with a focus on SQUARE BRACKETS CONTENT and regular expression rules for brackets.

- Create a new XML file type and selecting this new content processor:

Trados Studio preview window displaying XML content with square brackets, indicating that the regular expression rules may not be applied correctly.

The preview on the XML file shows that I've not quite done things right, any idea as to what?

Thanks a lot,

Romain



Generated Image Alt-Text
[edited by: RWS Community AI at 10:49 AM (GMT 0) on 14 Nov 2024]
emoji
Parents
  • Hi ,
    Try this regex: [?<=\[][^\]]+[?=\]] in Project Settings.
    Select 'Placeholder' as a tag type.
    Trados Studio Project Settings window showing Embedded Content section with regex entered in Tag definition rules and 'Placeholder' selected as Tag Type.
    Keep in mind that you have to re-import your source file(s) to make sure that the changes have applied. It means that you have to remove sdlxliff files both from the source and target panes in Trados. Then drag and drop your file(s) again into the source pane and run the 'Prepare without project TM' batch task. This is how you re-build both sdlxliff files with the new embedded content rule.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:10 PM (GMT 0) on 1 Mar 2024]
Reply
  • Hi ,
    Try this regex: [?<=\[][^\]]+[?=\]] in Project Settings.
    Select 'Placeholder' as a tag type.
    Trados Studio Project Settings window showing Embedded Content section with regex entered in Tag definition rules and 'Placeholder' selected as Tag Type.
    Keep in mind that you have to re-import your source file(s) to make sure that the changes have applied. It means that you have to remove sdlxliff files both from the source and target panes in Trados. Then drag and drop your file(s) again into the source pane and run the 'Prepare without project TM' batch task. This is how you re-build both sdlxliff files with the new embedded content rule.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:10 PM (GMT 0) on 1 Mar 2024]
Children