SDL Trados Studio XLIFF global attribute has been already declared

432 Views Asked by At

Not sure if this is the right place to ask the question, but...

I've got the following xliff file:

<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="file1.txt" datatype="plaintext" source-language="de-de" target-language="en-us">
    <body>
      <trans-unit id="unit_5">
        <source xml:lang="de">unit_5</source>
  </trans-unit>
    </body>
  </file>
</xliff>

I try to open the document as "translate single document" and get the following error from the image below. What might it be?.

SDL Translation Studio error

3

There are 3 best solutions below

0
On

I just opened your xliff file in Trados Studio 2014 (SP1) without any error messages coming up. I am afraid I do not really understand what Studio was complaining about for you: the file looks fine to me.

Did you try to disable schema validation in the file type settings for XLIFF, just as a workaround?

Best, Jenszcz

0
On

Generally, file[source-language] and trans-unit[xml:lang] should have the same value. I'm not sure if it's allowed to use different notations (de, de-de).

Also, I've found Trados to be a bit strict and sometimes you'll see that even if the specs allow for some elements to be missing, in some cases Trados still expects them to be present. I'd try putting the target node inside trans-unit and see if it works.

0
On

From the XLIFF 1.2 spec:

The optional xml:lang attribute is used to specify the content language of the <source> this should always match source-language as a child of trans-unit but can vary as a child of alt-trans.

So I think it's probably the mismatch between de and de-de that is causing the complaint. You could align these values, or just remove xml:space from the <source> element entirely, as it is optional in this context.