Difficulty creating Studio File Type for XML file with CDATA sections

I am trying to set up a Studio File Type for processing XML files that contain CDATA sections such as the following

<translation><![CDATA[<p align='left'><font size='9.0pt'><u><b>Text:</b></u></font><font size='9.0pt'><br />Text<br /><br />Text</font></p>]]></translation>

I use the embedded content XML file type in Studio with the following settings under Embedded content.

 

In the parser rules, the <translation> tag is defined as the only translatable tag in the XML structure.

When I open the file in Studio, the segment given above looks like this in the editor:

The problem I´m having is that I am not able to configure the file type so that is treats the break tag <br /> as the end of the segment, so that the phrase after the breaks appears in a new segment.

I have tried configuring it as both an inline and structure tag, but both solutions do not work.

I would greatly appreciate any help I could get.

Frank

  • Go to the embedded content processor, chose the one you've selected in HTML, locate the BR-tag in parser there and declare it to "structure". This will do what you expect.

    Of course you need to do that before you convert the file to SDLXLIFF and you need to change this setting within the project template you are using.

    _________________________________________________________

    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.

  • Hi Frank,

    It's enough to set the segmentation hint to "Exclude" on the embedded content rule and the text will break... assuming you are not using the legacy xml filetype?  Try the attached settings filetype and example xml:

    Frank Drefs.zip

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hi Paul and Jerzy,

    thank you very much for your help.

    To be honest, I wasn´t aware of the embedded content processors and the parser rules defined in there. I guess that´s something I won´t forget in the future.

    I finally did manage to get the file type to work the way I wanted to.

    By the way: Is there a simple way to hide the tags that mark the embedded CDATA sections in the Studio editor?

    Regards

    Frank

  • Unknown said:
    By the way: Is there a simple way to hide the tags that mark the embedded CDATA sections in the Studio editor?

    Hi Frank,

    If you mean the orange tabs between the sections then the only way to hide these is to use the legacy xml filetype and manually create all the regex embedded content rules.  

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hi Paul,

    alright, thanks for the answer.

    Then I´ll just live with it.

    Regards

    Frank