Opening xlf files in Studio - sometimes it works, sometimes not. What could it be?

Dear all,

We regularly translate xlf files for one customer. But sometimes we are just not able to open them in Studio Professional 2022.

We get all kinds of error messages, like:

- hexadecimal value 0x02 is not valid

- the element named "xliff" is an unvalid child for the XliffProvider element

Does anybody have an idea what could be the problem?

Trados Studio Task Results window showing 0 errors and 6 warnings. Warnings include 'Pre-Scanning failed to identify the file type' and 'Pre-Scanning Error: hexadecimal value 0x02 is an invalid character.'



Generated Image Alt-Text
[edited by: Trados AI at 11:42 AM (GMT 0) on 29 Feb 2024]
emoji
Parents Reply
  •  

    Thanks for sending me the files.  As far as I can see the problems in both files seem to come from the use of the xhtml:style attribute in the "g" element.  Your files have things like this:

    <source><g id="orkz5RjWv9Gr0yP1" ctype="x-html-P"><g id="nI4PrtI72CLqVcqf" ctype="x-html-SPAN" xhtml:style="color: rgb(255, 255, 255); font-size: 30px;">Klik op de balk hieronder om naar het <g id="Jxucshm1a6IDxDKD" ctype="x-html-STRONG">volgende hoofdstuk</g> te gaan.</g></g></source>

    Non-XLIFF attributes like xhtml:style can technically be placed within <g> tags, as you've done in your example, according to the XLIFF 1.2 specification as long as the namespace is declared... and your files do that too. The specification does not explicitly forbid this kind of usage.

    But, this practice can lead to complications since some XLIFF parsers and tools won't understand or correctly handle this attribute.  Seeing errors if the XLIFF parser strictly adheres to the specification and does not recognize xhtml:style is not unexpected and Studio certainly will stick to the rules.  I also tested in a validation tool and see this:

    Screenshot showing an error message on validating an XLIFF file.

    If it is absolutely necessary to include this non-standard attribute in your XLIFF file, the location you have placed it in is technically correct, as per the XLIFF 1.2 specification. However, for broad compatibility and adherence to best practices, it's recommended to handle styling via CSS in the actual web application and not embed these details within the XLIFF files.

    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
Children