Subject: [VCARDDAV] vcardrev-12 sections 5.1, 5.5

From: "Javier Godoy" <[email-masked]>
Date: Tue, 13 Jul 2010 05:39:30 -0300

----- Original Message ----- 
From: "Simon Perreault" <[email-masked]>
To: <[email-masked]>
Sent: Monday, May 31, 2010 5:01 PM
Subject: Re: [VCARDDAV] Issue in vcardrev-11 with LANGUAGE examples?

> On 2010-05-29 19:59, Markus Lorenz wrote:
>> Hey guys,
>>
>> I'm a bit confused about the first illegal example in section "5.1.
>> LANGUAGE".
>>
>> The description says:
>>
>>     Properties with different LANGUAGE parameters that represent the same
>>     data count as 1 toward cardinality and MUST have the same PID value
>>     if the PID parameter is used.  This is because there is logically a
>>     single property which is expressed in multiple languages.
>>
>> The legal examples is the following:
>>
>>       BIRTH;LANGUAGE=fr:Ville de Quebec
>>       BIRTH;LANGUAGE=en:Quebec City
>>
>> These LANGUAGE parameters represent the same data. Therefore they count
>> as 1 towards cardinality. If the PID is used it MUST have the same value
>> for both parameters, because they represent the same data. Inserting a
>> PID with value 1 to the legal example leads to this:
>>
>>       BIRTH;PID=1;LANGUAGE=fr:Ville de Quebec
>>       BIRTH;PID=1;LANGUAGE=en:Quebec City
>>
>> This is similar to the first _illegal_ example!
>
> Yes I'm confused as well. I can't find traces of how I got it this way. I
> think you're right. I'll change the example so that the two cases above are
> legal.
>
> Thanks,
> Simon
> -- 

In version 12, Section 5.1 reads [[
 Properties with different LANGUAGE parameters that represent the same
 data count as 1 toward cardinality and MUST have the same PID value
 if the PID parameter is used. This is because there is logically a
 single property which is expressed in multiple languages.

 Therefore, since BIRTH (Section 6.2.7) has cardinality (0,1), these
 two examples would be legal:

 BIRTH;LANGUAGE=en:Quebec City
 BIRTH;LANGUAGE=fr:Ville de Quebec

 BIRTH;PID=1;LANGUAGE=fr:Ville de Quebec
 BIRTH;PID=1;LANGUAGE=en:Quebec City
]]

(sorry, it seems I missed that message and it was the last about this issue)

I think the second example is illegal because Section 5.5 requires the PID
parameter MUST NOT appear on properties that may have only one instance per
vCard, and Section 6 defines cardinality (0,1) as "exactly one instance per
vCard MAY be present".

This is inconsistent: if PID were allowed, both properties would be considered
"different instances", which is not possible in this case because of the (0,1)
cardinality; on the other hand, the PID param must not appear if both
properties are understood as "a single property" (which in turn agrees with
the cardinality).

The definition of cardinality that we adopted emphasizes that every occurrence
of BIRTH represents the same birthplace, which is different from the case of
ORG (where the cardinality is 0..n because the name of several organizations
may be given in different languages).

Note also that the ABNF for BIRTH-param doesn't include a pid-param
alternative, thus rendering the example illegal even if 5.5 is redefined..

If the example is intended to be legal, the requirement in 5.5 should be
reworded, and maybe pid-param should be allowed where language-param is
allowed (otherwise the "legal" example wouldn't conform the ABNF).

I have a slight preference towards reverting this change and defining the 
example as "illegal" again, not only because it's easier to understand (and 
needs less modifications to what we have already agreed), but also because 
allowing PID for this case doesn't address any requirement.

Best Regards

Javier

---

From: Simon Perreault <[email-masked]>
Date: Tue, 13 Jul 2010 09:26:03 -0400

> alternative, thus rendering the example illegal even if 5.5 is redefined..

AARGH! You're very right. We need a new example that uses a different
property.

How about this one? I tried to illustrate every possible case to make
things really clear. Does it help?

   Therefore, since BIRTH (Section 6.2.7) has cardinality (0,1) and
   TITLE (Section 6.6.1) has cardinality (0,n), these four examples
   would be legal:

     TITLE;LANGUAGE=fr:Patron
     TITLE;LANGUAGE=en:Boss

     TITLE;LANGUAGE=fr;PID=1:Patron
     TITLE;LANGUAGE=en;PID=1:Boss

     TITLE;LANGUAGE=fr;PID=1:Patron
     TITLE;LANGUAGE=en;PID=1:Boss
     TITLE;LANGUAGE=en;PID=2:Chief vCard Evangelist

   while these three would not:

     BIRTH;LANGUAGE=fr;PID=1:Ville de Quebec
     BIRTH;LANGUAGE=en;PID=1:Quebec City
     (Cardinality (0,1) doesn't allow PID parameter.)

     BIRTH;LANGUAGE=fr:Ville de Quebec
     BIRTH:Quebec City
     (Two instances of the BIRTH property.)

     BIRTH;LANGUAGE=fr:Ville de Quebec
     BIRTH;LANGUAGE=en:Quebec City
     BIRTH;LANGUAGE=en:Montreal
     (Two instances of the BIRTH property with the same LANGUAGE.)

   and these two would be legal but questionable:

     TITLE;LANGUAGE=fr;PID=1:Patron
     TITLE;LANGUAGE=en;PID=2:Boss
     (Should probably have the same PID value.)

     TITLE;LANGUAGE=fr:Patron
     TITLE:Boss
     (Second line should probably have LANGUAGE=en.)

Simon
-- 
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server        --> http://numb.viagenie.ca
vCard 4.0               --> http://www.vcarddav.org

---

From: "Javier Godoy" <[email-masked]>
Date: Tue, 13 Jul 2010 19:05:02 -0300

> things really clear. Does it help?

Yes, it answers my question.

About the proposed examples, the explanation aftear each one helps a lot for 
understanding why they are illegal while other similar examples are legal.

The "legal but questionable" part is also useful, though I have another 
question.

>     (Second line should probably have LANGUAGE=en.)

Do we want to emphasize the difference between

     TITLE;LANGUAGE=fr:Patron
     TITLE;LANGUAGE=en:Boss

and

     TITLE;LANGUAGE=fr:Patron
     TITLE;LANGUAGE=en:Chief vCard Evangelist
?

In the first example there is a single logical property, in the second one
there are two logical properties.
I think it is likely they will be treated differently (e.g. displaying either
"Boss" or "Patron" according to the user preferences, and displaying both
"Chief vCard Evangelist" and "Patron" because they are different values).

While the specification doesn't mandate what is to be done in each case, it
should allow the difference to be realized, so that implementation-defined
actions can be performed.

Maybe the PID parameter SHOULD be used if values in different languages are 
given.for a property with cardinality (0,n) or (1,n), in order to disambiguate 
whether they are logically related or not.

Then the following two examples would be legal:
TITLE;PID=1;LANGUAGE=fr:Patron
TITLE;PID=1;LANGUAGE=en:Boss

TITLE;PID=1;LANGUAGE=fr:Patron
TITLE;PID=2;LANGUAGE=en:Chief vCard Evangelist

And the following examples would be legal but questionable

TITLE;LANGUAGE=fr:Patron
TITLE;LANGUAGE=en:Boss
(should probably use the same PID value.)

TITLE;LANGUAGE=fr:Patron
TITLE;LANGUAGE=en:Chief vCard Evangelist
(should probably use different PID values.)

TITLE;LANGUAGE=fr:Patron
TITLE:Boss
(should probably use the same PID value, and second line should probably have
LANGUAGE=en.)

Best Regards

Javier

---

From: Simon Perreault <[email-masked]>
Date: Thu, 15 Jul 2010 08:10:41 -0400

On 2010-07-13 18:05, Javier Godoy wrote:
> Maybe the PID parameter SHOULD be used if values in different languages
> are given.for a property with cardinality (0,n) or (1,n), in order to
> disambiguate whether they are logically related or not.

I agree!

Simon