[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VCARDDAV] SORT-STRING [was:vcardrev nits]



On Wednesday, September 16, 2009 12:14 PM Peter Saint-Andre wrote:

On 9/15/09 10:24 PM, Javier Godoy wrote:
Peter Saint-Andre wrote,

7.7.5. SORT-STRING

  locale- or national-language- specific sorting

This is hard to parse. I suggest:

  The sort string is used to provide family name or
  given name text that is to be used in sorting of
  the formatted name and structured name types in the
  context of a particular locale or national language.

I don't agree with the "context of a particular locale or national
language" part, as it seems to suggest that the collation is well-known
and defined somewhere else.
I would modify it by "an implied particular locale or national language."

That's better, yes.

Besides, the current special note "The sort string is used to provide
family name or given name text..." is ambiguous. How could the
sort-string be of use if one cannot tell whether it applies to the given
name or the family name.

Example 1
FN:Rene van der Harten
N:van der Harten;Rene;J.;Sir;R.D.O.N.
SORT-STRING:Harten

Example 2
FN:Rene van der Harten
N:van der Harten;Rene;J.;Sir;R.D.O.N.
SORT-STRING:Rene

In example 2 were specified (which is valid according to the
definition), I would collate "van der Harten" under R.

Correct. But that would be stupid. :) We can't save implementers from
their own stupidity, but I suppose we can help them understand that the
SORT-STRING is used for alphabetical sorting of family names containing
multiple words.

I agree it would be stupid, but it is allowed by the definition!. I think there is an implicit agreement on using SORT-STRING for specifying a collation key for the family name, despite of the definition allowing either "family name or given name". In order to solve this ambiguity, the purpose of SORT-STRING should not mention the given name (which is not going to be specified there).

I propose (from the text  you suggested above):
[[
Purpose: To specify the family name text to be used for national-language-specific sorting of the FN and N types.

Special notes: The sort string is used to provide family name text that is to be used in sorting of the formatted name and structured name types in the context of an implied locale or national language. Without this information, sorting algorithms could incorrectly sort this vCard within a sequence of sorted vCards. When this property is present in a vCard, then this value, instead of the family name, is used for sorting the vCard.
]]

(Alternatively, it may be "family name text or family and given names text" instead of "family name tet")


Best Regards

Javier