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 Reply Children
  • and im calling this embedded processor in thys file type

    Trados Studio Project Settings window showing 'Embedded content' selected with options to process embedded content using the processor 'Ekon Cursos Embedded Content'.

    <?xml version="1.0" encoding="UTF-8"?>
    <activity id="1064" moduleid="14858" modulename="page" contextid="25600">
      <page id="1064">
        <name>Introducción</name>
        <intro></intro>
        <introformat>1</introformat>
        <content>&lt;p&gt;&lt;/p&gt;&lt;span style="color: rgb(80, 79, 81);"&gt;&lt;p style="text-align: left;"&gt;Ekon Cadena de suministros es el software de gestión logística para la gestión de la actividad de suministro de materias primas, producción, almacenamiento, transporte a almacenes regionales, reparto a clientes, ventas y compras.&lt;/p&gt;&lt;/span&gt;&lt;p style="text-align: center;"&gt;&lt;iframe src="player.vimeo.com/.../482671404 width="853" height="481" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="" style="color: rgb(51, 51, 51);"&gt;&lt;/iframe&gt;&lt;br&gt;&lt;/p&gt;
    &lt;p style="text-align: center;"&gt;&lt;i&gt;Vídeo - Introducción a Cadena de Suministro&lt;/i&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;input type="button" value="Volver a la lección" onclick="history.go(-1);"&gt;&lt;p&gt;&lt;/p&gt;</content>
        <contentformat>1</contentformat>
        <legacyfiles>0</legacyfiles>
        <legacyfileslast>$@NULL@$</legacyfileslast>
        <display>5</display>
        <displayoptions>a:2:{s:12:"printheading";s:1:"1";s:10:"printintro";s:1:"0";}</displayoptions>
        <revision>9</revision>
        <timemodified>1620650152</timemodified>
      </page>
    </activity>

    bt the way, how can i create that structure you mention?

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:37 AM (GMT 0) on 29 Feb 2024]
  •  

    In the parser rules chose the corresponding rule, select edit and go to structure, edit, then select for example "Paragraph":

    Trados Studio parser rules interface showing the selection of the 'Paragraph' element rule with an arrow pointing to the 'Edit' button for structure information.

    In the embedded content part you MUST add this structure info, as otherwise no embedded content processing will take place.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:37 AM (GMT 0) on 29 Feb 2024]
  • thanks its better but not what i need. More ideas?

    the segment has ALL the content from the //content element hidden and i only need the soup of html tags to be inline tagged and the rest swon as its text to translate

    Screenshot of Trados Studio interface showing XML code with content elements and HTML tags. The segment to translate is highlighted, and the preview pane is open with a partial view of the formatted text.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:37 AM (GMT 0) on 29 Feb 2024]
  •  

    Please use html 5 as embedded content processor there. This might solve your problem. I'm sorry, but I cannot investigate further for now, am on my way to the airport. I might be able to look into it later, but most probably this will not happen before weekend, sorry.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji
  • good idea thanks!!

    and it solved it. I need to check if anything was hidden by mistake but for now it seems ok

    emoji