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
  • 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]
Children