Next in thread → Next in month →

Re: [xliff] Quick question on trgLang

From
Ryan King <>
Date
2014-10-28T19:21:43+00:00
ID
Thread
Re: [xliff] Quick question on trgLang
​Thanks for the replies everyone and the clear explanation, David!

From: Dr. David Filip <>

Sent: Tuesday, October 28, 2014 11:37 AM

To: Estreen, Fredrik

Cc: Yves Savourel; Ryan King; 

Subject: Re: [xliff] Quick question on trgLang

 

Ryan, good to see you working on it..

I of course agree with Yves and Fredrik on the interpretation. The main reason being that it really is NOT open to interpretation.. 

The Constraint does not say anything on when the attribute is OPTIONAL.

The attribute is OPTIONAL as per the schema and the "Contains:" normative and exhaustive enumeration.

The Constraint is a continuation of that definition and it specifies cases when the attribute becomes REQUIRED in contrast with its initially being described as OPTIONAL.

It is set apart because it cannot be expressed in a 1.0 xsd.

Now about the "verbiage".. There is an important logical distinction between "IF" and "IFF" (shorthand for "if and only if").

Whenever IFF is used it means a biconditional, conditional valid in both directions, a definitory equivalence. The only valid reason ever for that attribute becoming REQUIRED is that the Document has at least one <target> element. In old philosophical
 speech this means that having a <target> element is both necessary and sufficient for trgLang being REQUIRED on the Document.

It is also true that when the Document does NOT have a <target> the trgLang attribute is NOT REQUIRED. 

But NOT REQUIRED is equivalent with OPTIONAL not with MUST NOT be set or similar (forbidden).. I guess this was where you got confused and thought that it might mean forbidden. It does not and cannot to be sure :-) 

In the modern logical sense, you can say that the attribute being REQUIRED is coextensive with any Document having a <target>.

The closest to plain English is this. IFF statement means that the IF statement is true in both directions.

IFF = <->

IF = ->

(p<->q) -> ((p->q) & (q->p))

((p->q) & (q->p)) -> (p<->q)

--------------

(p<->q) <-> ((p->q) & (q->p))

   

The IFF statement is stronger because it implies both IF statements, while any of the IF statements alone does not say anything about the other way round.

I made every effort to have the IFFs used properly throughout the spec. When you are testing them, you can always decompose them into two IF statements with the antecendent (p) and consequent (q) switched as shown above..

I hope this helps in reading the spec in general

Cheers

dF

 

Dr. David Filip

=======================

OASIS XLIFF TC Secretary, Editor, and Liaison Officer 

LRC | CNGL | CSIS

University of Limerick, Ireland

telephone: +353-6120-2781

cellphone: +353-86-0222-158

facsimile: +353-6120-2734

http://www.cngl.ie/profile/?i=452

mailto: 

On Tue, Oct 28, 2014 at 11:30 AM, Estreen, Fredrik 
<> wrote:

Hi Ryan, Yves,

 

I also read it as trgLang is optional if there are no targets and required if there is a target.

 

This also makes the most sense from a usage perspective. You can prepare a source file once without setting it and then translate copies into different
 languages. Or you can set a specific language before handing a file to someone for processing to ensure you get it processed for the correct language. If there is any target content it must have an associated language,

 

Regards,

Fredrik Estreen

 

From:
 [mailto:]
On Behalf Of Yves Savourel

Sent: den 27 oktober 2014 22:35

To: 'Ryan King'; 


Subject: 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
Next in thread → Next in month →