[Date Prev][Date Next] [Chronological] [Thread] [Top]

Language Tags (WG last call on the Java API)



As I've noted previously, I believe the "core" API specification
should not address LDAP extensions such as Language Tags for
LDAP (RFC 2596).  APIs for LDAP extensions are best handled as
extensions to a "core" API.

Anyways...

The document needs a normative reference to RFC 2596.

The document uses "subtype" to refer to attribute description
options.  This is confusing.

4.1.7 getLangSubtype
   Returns the language subtype, if any. For example, if the attribute 
   name is cn;lang-ja;phonetic, this method returns the String lang-ja.

but RFC 2596 says:
   Multiple language options may be present on a particular value.

getLangSubtype should return a list of options.


Section 4.3.5 says:
   "cn;lang-ja-JP-kanji" may be a subtype of "cn;lang-ja".

No!  RFC 2596 says:
  Language codes are case insensitive....  Implementations MUST NOT
  otherwise interpret the structure of the code when comparing two codes,
  and MUST treat them as simply strings of characters.

Hence, "cn;lang-ja-JP-kanji" IS NOT a subtype of "cn;lang-ja".

Section 4.3.5 continues:
   getAttribute(attrName, lang) returns the subtype that matches 
   attrName and that best matches lang.

I believe "best matches" is inappropriate.  A lang option either
matches (case insensitively) or it doesn't.

Also, 4.3.7 lists the example description "sn;phonetic;lang-ja".
This is an invalid description.  Options must be presented in
ascending order per RFC 2251.