XML issue: why Studio 2021 SR1 - 16.1.3.4096 (O/S sadly is WIN 7 Home professional) replaces the ' with a "?

A customer would send me XML files for translation since many years. The problem is that I receive error messages described in the screenshots attached. I (not at all XML programmer) looked into old XML files, and there was a file called uptime_trans.dtd. This was not sent along with the latest XML files. In Studio 2013 (as in all legacy versions) there is a facility in which Project Settings  contained all types of files with various XML types among them (vd. screenshot)

Screenshot of Trados Studio Project Settings showing a list of file types including various XML types.

I am not a XML programmer, but I reckon that there is a way to enter this dtd file into the row with the file types so that further XML files can be treated adequately. Is this assumption correct? If so, how could I include the dtd file into the row with all the file types?

A further issue with these XML files was that a ' was replaced with a " which the effect that the customer could not oopen the target file although he could view the bilingual translation on Studio's editor screen. Why did Studio replace the ' with a double quotation mark " causing this error? I paste relevant files here hoping that they yield sufficient information. I really would appreciate your support since this issue is with a longtime customer, and it is hard to keep them during this pandemic.

Screenshot of Trados Studio editor screen displaying XML file content with highlighted text where a single quote is replaced by a double quotation mark.  Screenshot of Trados Studio XML view with blue highlighted text showing the structure of an XML file.Error message window in Trados Studio listing multiple XML parsing errors with details such as line and position numbers.

Theme_Stromversorgung SMPS_00003.xmlTheme_Stromversorgung SMPS_00003_E.xmlText snippet showing XML DTD file content with elements and attributes defined for uptime_trans.



Generated Image Alt-Text
[edited by: Trados AI at 3:24 AM (GMT 0) on 29 Feb 2024]
emoji
Parents
  • I am not a XML programmer, but I reckon that there is a way to enter this dtd file into the row with the file types so that further XML files can be treated adequately. Is this assumption correct?

    Sort of.  The dtd is only used to validate the correctness of the XML.  Ideally you would create a custom XML filetype for your file and then include your schema if it's important for you to have the xml validated against it:

    https://docs.sdl.com/813470/534137/sdl-trados-studio-2021-sr1/xml-validation-page

    If you don't have the dtd then just turn off the validation as you don't have anything to validate against:

    Trados Studio options menu with XML validation settings, showing options to perform validation and to manually specify schemas.

    I created a new XML filetype using your XML file to create the parser rules automatically... so I haven't made any changes to exclude stuff or handle anything in attributes but when I use this and the validation off I see this:

    Trados Studio editor view with a message displaying 'No errors...' indicating successful XML file parsing without validation errors.

    I also don't see where you get the ' replaced with a ".  Can you point me to exactly where I need to look?

    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

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:24 AM (GMT 0) on 29 Feb 2024]
  • probably means that the attribute values are enclosed in double quotes in the translated document. They were enclosed in single quotes AND sometimes in double quotes in the original. Both is perfectly legal for XML and HTML as far as I know:

    Original:

    Screenshot of Trados Studio XML code with correct attribute values enclosed in double quotes.

    Screenshot highlighting errors in Trados Studio XML code where attribute values are incorrectly enclosed in single quotes.

    Translation:

    Screenshot of Trados Studio XML code with correct attribute values enclosed in double quotes, similar to alt_text_1.

    Screenshot highlighting errors in Trados Studio XML code with unescaped characters such as less than and greater than signs.

    After having a second look: The file with "E" at the end, which I thought was Studio's output, is NOT the translation of the other file, but has been transformed somehow. Incorrectly.

    Original:

    Screenshot of Trados Studio showing a waveform with two marked sections indicating potential audio errors.

    "E"-File:

    Screenshot of Trados Studio showing a waveform with one marked section indicating a potential audio error.

    There are a lot of unescaped characters in the element values of the source file which should have been escaped: <, >, ", '. That is with certaintly a source of problems.

    I wish I would understand what's going on with these files, but unfortunately I don't have the time to look further.

    Daniel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:25 AM (GMT 0) on 29 Feb 2024]
Reply
  • probably means that the attribute values are enclosed in double quotes in the translated document. They were enclosed in single quotes AND sometimes in double quotes in the original. Both is perfectly legal for XML and HTML as far as I know:

    Original:

    Screenshot of Trados Studio XML code with correct attribute values enclosed in double quotes.

    Screenshot highlighting errors in Trados Studio XML code where attribute values are incorrectly enclosed in single quotes.

    Translation:

    Screenshot of Trados Studio XML code with correct attribute values enclosed in double quotes, similar to alt_text_1.

    Screenshot highlighting errors in Trados Studio XML code with unescaped characters such as less than and greater than signs.

    After having a second look: The file with "E" at the end, which I thought was Studio's output, is NOT the translation of the other file, but has been transformed somehow. Incorrectly.

    Original:

    Screenshot of Trados Studio showing a waveform with two marked sections indicating potential audio errors.

    "E"-File:

    Screenshot of Trados Studio showing a waveform with one marked section indicating a potential audio error.

    There are a lot of unescaped characters in the element values of the source file which should have been escaped: <, >, ", '. That is with certaintly a source of problems.

    I wish I would understand what's going on with these files, but unfortunately I don't have the time to look further.

    Daniel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:25 AM (GMT 0) on 29 Feb 2024]
Children