RE: [xliff] Quick question on trgLang

From
Yves Savourel <>
Date
2014-10-27T21:35:37+00:00
ID
[email protected]
Thread
RE: [xliff] Quick question on trgLang
Hi Ryan,

 

My reading is the same as your first one: that trgLang is optional except when there is one or more <target> in the document.

 

Cheers,

-ys

 

From:  [mailto:] On Behalf Of Ryan King
Sent: Monday, October 27, 2014 3:29 PM
To: 
Subject: [xliff] Quick question on trgLang

 

Hi all,

 

As we’ve started implementing the standard, there are, of course, differing interpretations of some of the wording in the spec. Can the TC as a group please help me understand the following:

 
4.2.2.1 xliff
…

Constraints

·       The trgLang attribute is REQUIRED if and only if the XLIFF Document contains <target> elements that are children of <segment> or <ignorable>. 

Does this constraint mean:

·       The trgLang attribute is REQUIRED if the XLIFF Document contains <target> elements that are children of <segment> or <ignorable>, otherwise it is optional. 

Or does it mean:

·       The trgLang attribute is REQUIRED only if the XLIFF Document contains <target> elements that are children of <segment> or <ignorable>, otherwise it MUST not be present. 

For example, is this legal?

<xliff version=”2.0” srcLang=”en-us” trgLang=”de-de”>
…
   <unit id=”1”>
      <segment id=”1”>Hello World</segment>
   </unit>

I think it is, but want to be sure I am reading this correctly. In a more general question, is there a reason why the verbiage “if and only if” is used throughout the spec and not just “if”?

Thanks,
Ryan