rfc3866.txt revision 1.1 1 1.1 lukem
2 1.1 lukem
3 1.1 lukem
4 1.1 lukem
5 1.1 lukem
6 1.1 lukem
7 1.1 lukem Network Working Group K. Zeilenga, Ed.
8 1.1 lukem Request for Comments: 3866 OpenLDAP Foundation
9 1.1 lukem Obsoletes: 2596 July 2004
10 1.1 lukem Category: Standards Track
11 1.1 lukem
12 1.1 lukem
13 1.1 lukem Language Tags and Ranges in the
14 1.1 lukem Lightweight Directory Access Protocol (LDAP)
15 1.1 lukem
16 1.1 lukem Status of this Memo
17 1.1 lukem
18 1.1 lukem This document specifies an Internet standards track protocol for the
19 1.1 lukem Internet community, and requests discussion and suggestions for
20 1.1 lukem improvements. Please refer to the current edition of the "Internet
21 1.1 lukem Official Protocol Standards" (STD 1) for the standardization state
22 1.1 lukem and status of this protocol. Distribution of this memo is unlimited.
23 1.1 lukem
24 1.1 lukem Copyright Notice
25 1.1 lukem
26 1.1 lukem Copyright (C) The Internet Society (2004).
27 1.1 lukem
28 1.1 lukem Abstract
29 1.1 lukem
30 1.1 lukem It is often desirable to be able to indicate the natural language
31 1.1 lukem associated with values held in a directory and to be able to query
32 1.1 lukem the directory for values which fulfill the user's language needs.
33 1.1 lukem This document details the use of Language Tags and Ranges in the
34 1.1 lukem Lightweight Directory Access Protocol (LDAP).
35 1.1 lukem
36 1.1 lukem 1. Background and Intended Use
37 1.1 lukem
38 1.1 lukem The Lightweight Directory Access Protocol (LDAP) [RFC3377] provides a
39 1.1 lukem means for clients to interrogate and modify information stored in a
40 1.1 lukem distributed directory system. The information in the directory is
41 1.1 lukem maintained as attributes of entries. Most of these attributes have
42 1.1 lukem syntaxes which are human-readable strings, and it is desirable to be
43 1.1 lukem able to indicate the natural language associated with attribute
44 1.1 lukem values.
45 1.1 lukem
46 1.1 lukem This document describes how language tags and ranges [RFC3066] are
47 1.1 lukem carried in LDAP and are to be interpreted by LDAP implementations.
48 1.1 lukem All LDAP implementations MUST be prepared to accept language tags and
49 1.1 lukem ranges.
50 1.1 lukem
51 1.1 lukem The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
52 1.1 lukem "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
53 1.1 lukem document are to be interpreted as described in BCP 14 [RFC2119].
54 1.1 lukem
55 1.1 lukem
56 1.1 lukem
57 1.1 lukem
58 1.1 lukem Zeilenga Standards Track [Page 1]
59 1.1 lukem
61 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
62 1.1 lukem
63 1.1 lukem
64 1.1 lukem This document replaces RFC 2596. Appendix A summaries changes made
65 1.1 lukem since RFC 2596.
66 1.1 lukem
67 1.1 lukem Appendix B discusses differences from X.500(1997) "contexts"
68 1.1 lukem mechanism.
69 1.1 lukem
70 1.1 lukem Appendix A and B are provided for informational purposes only.
71 1.1 lukem
72 1.1 lukem The remainder of this section provides a summary of Language Tags,
73 1.1 lukem Language Ranges, and Attribute Descriptions.
74 1.1 lukem
75 1.1 lukem 1.1. Language Tags
76 1.1 lukem
77 1.1 lukem Section 2 of BCP 47 [RFC3066] describes the language tag format which
78 1.1 lukem is used in LDAP. Briefly, it is a string of [ASCII] letters and
79 1.1 lukem hyphens. Examples include "fr", "en-US" and "ja-JP". Language tags
80 1.1 lukem are case insensitive. That is, the language tag "en-us" is the same
81 1.1 lukem as "EN-US".
82 1.1 lukem
83 1.1 lukem Section 2 of this document details use of language tags in LDAP.
84 1.1 lukem
85 1.1 lukem 1.2. Language Ranges
86 1.1 lukem
87 1.1 lukem Section 2.5 of BCP 47 [RFC3066] describes the language ranges.
88 1.1 lukem Language ranges are used to specify sets of language tags.
89 1.1 lukem
90 1.1 lukem A language range matches a language tag if it is exactly equal to the
91 1.1 lukem tag, or if it is exactly equal to a prefix of the tag such that the
92 1.1 lukem first character following the prefix is "-". That is, the language
93 1.1 lukem range "de" matches the language tags "de" and "de-CH" but not "den".
94 1.1 lukem The special language range "*" matches all language tags.
95 1.1 lukem
96 1.1 lukem Due to attribute description option naming restrictions in LDAP, this
97 1.1 lukem document defines a different language range syntax. However, the
98 1.1 lukem semantics of language ranges in LDAP are consistent with BCP 47.
99 1.1 lukem
100 1.1 lukem Section 3 of this document details use of language ranges in LDAP.
101 1.1 lukem
102 1.1 lukem 1.3. Attribute Descriptions
103 1.1 lukem
104 1.1 lukem This section provides an overview of attribute descriptions in LDAP.
105 1.1 lukem LDAP attributes and attribute descriptions are defined in [RFC2251].
106 1.1 lukem
107 1.1 lukem An attribute consists of a type, a set of zero or more associated
108 1.1 lukem tagging options, and a set of one or more values. The type and the
109 1.1 lukem options are combined into the AttributeDescription.
110 1.1 lukem
111 1.1 lukem
112 1.1 lukem
113 1.1 lukem
114 1.1 lukem
115 1.1 lukem Zeilenga Standards Track [Page 2]
116 1.1 lukem
118 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
119 1.1 lukem
120 1.1 lukem
121 1.1 lukem AttributeDescriptions can also contain options which are not part of
122 1.1 lukem the attribute, but indicate some other function (such as range
123 1.1 lukem assertion or transfer encoding).
124 1.1 lukem
125 1.1 lukem An AttributeDescription with one or more tagging options is a direct
126 1.1 lukem subtype of each AttributeDescription of the same type with all but
127 1.1 lukem one of the tagging options. If the AttributeDescription's type is a
128 1.1 lukem direct subtype of some other type, then the AttributeDescription is
129 1.1 lukem also a direct subtype of the AttributeDescription which consists of
130 1.1 lukem the supertype and all of the tagging options. That is,
131 1.1 lukem "CN;x-bar;x-foo" is a direct subtype of "CN;x-bar", "CN;x-foo", and
132 1.1 lukem "name;x-bar;x-foo". Note that "CN" is a subtype of "name".
133 1.1 lukem
134 1.1 lukem 2. Use of Language Tags in LDAP
135 1.1 lukem
136 1.1 lukem This section describes how LDAP implementations MUST interpret
137 1.1 lukem language tags in performing operations.
138 1.1 lukem
139 1.1 lukem Servers which support storing attributes with language tag options in
140 1.1 lukem the Directory Information Tree (DIT) SHOULD allow any attribute type
141 1.1 lukem it recognizes that has the Directory String, IA5 String, or other
142 1.1 lukem textual string syntaxes to have language tag options associated with
143 1.1 lukem it. Servers MAY allow language options to be associated with other
144 1.1 lukem attributes types.
145 1.1 lukem
146 1.1 lukem Clients SHOULD NOT assume servers are capable of storing attributes
147 1.1 lukem with language tags in the directory.
148 1.1 lukem
149 1.1 lukem Implementations MUST NOT otherwise interpret the structure of the tag
150 1.1 lukem when comparing two tags, and MUST treat them simply as strings of
151 1.1 lukem characters. Implementations MUST allow any arbitrary string which
152 1.1 lukem conforms to the syntax defined in BCP 47 [RFC3066] to be used as a
153 1.1 lukem language tag.
154 1.1 lukem
155 1.1 lukem 2.1. Language Tag Options
156 1.1 lukem
157 1.1 lukem A language tag option associates a natural language with values of an
158 1.1 lukem attribute. An attribute description may contain multiple language
159 1.1 lukem tag options. An entry may contain multiple attributes with same
160 1.1 lukem attribute type but different combinations of language tag (and other)
161 1.1 lukem options.
162 1.1 lukem
163 1.1 lukem A language tag option conforms to the following ABNF [RFC2234]:
164 1.1 lukem
165 1.1 lukem language-tag-option = "lang-" Language-Tag
166 1.1 lukem
167 1.1 lukem
168 1.1 lukem
169 1.1 lukem
170 1.1 lukem
171 1.1 lukem
172 1.1 lukem Zeilenga Standards Track [Page 3]
173 1.1 lukem
175 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
176 1.1 lukem
177 1.1 lukem
178 1.1 lukem where the Language-Tag production is as defined in BCP 47 [RFC3066].
179 1.1 lukem This production and those it imports from [RFC2234] are provided here
180 1.1 lukem for convenience:
181 1.1 lukem
182 1.1 lukem Language-Tag = Primary-subtag *( "-" Subtag )
183 1.1 lukem
184 1.1 lukem Primary-subtag = 1*8ALPHA
185 1.1 lukem
186 1.1 lukem Subtag = 1*8(ALPHA / DIGIT)
187 1.1 lukem
188 1.1 lukem ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
189 1.1 lukem
190 1.1 lukem DIGIT = %x30-39 ; 0-9
191 1.1 lukem
192 1.1 lukem A language tag option is a tagging option. A language tag option has
193 1.1 lukem no effect on the syntax of the attribute's values nor their transfer
194 1.1 lukem encoding.
195 1.1 lukem
196 1.1 lukem Examples of valid AttributeDescription:
197 1.1 lukem
198 1.1 lukem givenName;lang-en-US
199 1.1 lukem CN;lang-ja
200 1.1 lukem SN;lang-de;lang-gem-PFL
201 1.1 lukem O;lang-i-klingon;x-foobar
202 1.1 lukem description;x-foobar
203 1.1 lukem CN
204 1.1 lukem
205 1.1 lukem Notes: The last two have no language tag options. The x-foobar
206 1.1 lukem option is fictious and used for example purposes.
207 1.1 lukem
208 1.1 lukem 2.2. Search Filter
209 1.1 lukem
210 1.1 lukem If language tag options are present in an AttributeDescription in an
211 1.1 lukem assertion, then for each entry within scope, the values of each
212 1.1 lukem attribute whose AttributeDescription consists of the same attribute
213 1.1 lukem type or its subtypes and contains each of the presented (and possibly
214 1.1 lukem other) options is to be matched.
215 1.1 lukem
216 1.1 lukem Thus, for example, a filter of an equality match of type
217 1.1 lukem "name;lang-en-US" and assertion value "Billy Ray", against the
218 1.1 lukem following directory entry:
219 1.1 lukem
220 1.1 lukem dn: SN=Ray,DC=example,DC=com
221 1.1 lukem objectClass: person DOES NOT MATCH (wrong type)
222 1.1 lukem objectClass: extensibleObject DOES NOT MATCH (wrong type)
223 1.1 lukem name;lang-en-US: Billy Ray MATCHES
224 1.1 lukem name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value)
225 1.1 lukem CN;lang-en-US: Billy Ray MATCHES
226 1.1 lukem
227 1.1 lukem
228 1.1 lukem
229 1.1 lukem Zeilenga Standards Track [Page 4]
230 1.1 lukem
232 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
233 1.1 lukem
234 1.1 lukem
235 1.1 lukem CN;lang-en-US;x-foobar: Billy Ray MATCHES
236 1.1 lukem CN;lang-en;x-foobar: Billy Ray DOES NOT MATCH (differing lang-)
237 1.1 lukem CN;x-foobar: Billy Ray DOES NOT MATCH (no lang-)
238 1.1 lukem name: Billy Ray DOES NOT MATCH (no lang-)
239 1.1 lukem SN;lang-en-GB;lang-en-US: Billy Ray MATCHES
240 1.1 lukem SN: Ray DOES NOT MATCH (no lang-,
241 1.1 lukem wrong value)
242 1.1 lukem
243 1.1 lukem Note that "CN" and "SN" are subtypes of "name".
244 1.1 lukem
245 1.1 lukem It is noted that providing a language tag option in a search filter
246 1.1 lukem AttributeDescription will filter out desirable values where the tag
247 1.1 lukem does not match exactly. For example, the filter (name;lang-en=Billy
248 1.1 lukem Ray) does NOT match the attribute "name;lang-en-US: Billy Ray".
249 1.1 lukem
250 1.1 lukem If the server does not support storing attributes with language tag
251 1.1 lukem options in the DIT, then any assertion which includes a language tag
252 1.1 lukem option will not match as such it is an unrecognized attribute type.
253 1.1 lukem No error would be returned because of this; a presence assertion
254 1.1 lukem would evaluate to FALSE and all other assertions to Undefined.
255 1.1 lukem
256 1.1 lukem If no options are specified in the assertion, then only the base
257 1.1 lukem attribute type and the assertion value need match the value in the
258 1.1 lukem directory.
259 1.1 lukem
260 1.1 lukem Thus, for example, a filter of an equality match of type "name" and
261 1.1 lukem assertion value "Billy Ray", against the following directory entry:
262 1.1 lukem
263 1.1 lukem dn: SN=Ray,DC=example,DC=com
264 1.1 lukem objectClass: person DOES NOT MATCH (wrong type)
265 1.1 lukem objectClass: extensibleObject DOES NOT MATCH (wrong type)
266 1.1 lukem name;lang-en-US: Billy Ray MATCHES
267 1.1 lukem name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value)
268 1.1 lukem CN;lang-en-US;x-foobar: Billy Ray MATCHES
269 1.1 lukem CN;lang-en;x-foobar: Billy Ray MATCHES
270 1.1 lukem CN;x-foobar: Billy Ray MATCHES
271 1.1 lukem name: Billy Ray MATCHES
272 1.1 lukem SN;lang-en-GB;lang-en-US: Billy Ray MATCHES
273 1.1 lukem SN: Ray DOES NOT MATCH (wrong value)
274 1.1 lukem
275 1.1 lukem 2.3. Requested Attributes in Search
276 1.1 lukem
277 1.1 lukem Clients can provide language tag options in each AttributeDescription
278 1.1 lukem in the requested attribute list in a search request.
279 1.1 lukem
280 1.1 lukem If language tag options are provided in an attribute description,
281 1.1 lukem then only attributes in a directory entry whose attribute
282 1.1 lukem descriptions have the same attribute type or its subtype and contains
283 1.1 lukem
284 1.1 lukem
285 1.1 lukem
286 1.1 lukem Zeilenga Standards Track [Page 5]
287 1.1 lukem
289 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
290 1.1 lukem
291 1.1 lukem
292 1.1 lukem each of the presented (and possibly other) language tag options are
293 1.1 lukem to be returned. Thus if a client requests just the attribute
294 1.1 lukem "name;lang-en", the server would return "name;lang-en" and
295 1.1 lukem "CN;lang-en;lang-ja" but not "SN" nor "name;lang-fr".
296 1.1 lukem
297 1.1 lukem Clients can provide in the attribute list multiple
298 1.1 lukem AttributeDescriptions which have the same base attribute type but
299 1.1 lukem different options. For example, a client could provide both
300 1.1 lukem "name;lang-en" and "name;lang-fr", and this would permit an attribute
301 1.1 lukem with either language tag option to be returned. Note there would be
302 1.1 lukem no need to provide both "name" and "name;lang-en" since all subtypes
303 1.1 lukem of name would match "name".
304 1.1 lukem
305 1.1 lukem If a server does not support storing attributes with language tag
306 1.1 lukem options in the DIT, then any attribute descriptions in the list which
307 1.1 lukem include language tag options are to be ignored, just as if they were
308 1.1 lukem unknown attribute types.
309 1.1 lukem
310 1.1 lukem If a request is made specifying all attributes or an attribute is
311 1.1 lukem requested without providing a language tag option, then all attribute
312 1.1 lukem values regardless of their language tag option are returned.
313 1.1 lukem
314 1.1 lukem For example, if the client requests a "description" attribute, and a
315 1.1 lukem matching entry contains the following attributes:
316 1.1 lukem
317 1.1 lukem objectClass: top
318 1.1 lukem objectClass: organization
319 1.1 lukem O: Software GmbH
320 1.1 lukem description: software products
321 1.1 lukem description;lang-en: software products
322 1.1 lukem description;lang-de: Softwareprodukte
323 1.1 lukem
324 1.1 lukem The server would return:
325 1.1 lukem
326 1.1 lukem description: software products
327 1.1 lukem description;lang-en: software products
328 1.1 lukem description;lang-de: Softwareprodukte
329 1.1 lukem
330 1.1 lukem 2.4. Compare
331 1.1 lukem
332 1.1 lukem Language tag options can be present in an AttributeDescription used
333 1.1 lukem in a compare request AttributeValueAssertion. This is to be treated
334 1.1 lukem by servers the same as the use of language tag options in a search
335 1.1 lukem filter with an equality match, as described in Section 2.2. If there
336 1.1 lukem is no attribute in the entry with the same attribute type or its
337 1.1 lukem subtype and contains each of the presented (or possibly other)
338 1.1 lukem language tag options, the noSuchAttributeType error will be returned.
339 1.1 lukem
340 1.1 lukem
341 1.1 lukem
342 1.1 lukem
343 1.1 lukem Zeilenga Standards Track [Page 6]
344 1.1 lukem
346 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
347 1.1 lukem
348 1.1 lukem
349 1.1 lukem Thus, for example, a compare request of type "name" and assertion
350 1.1 lukem value "Johann", against an entry containing the following attributes:
351 1.1 lukem
352 1.1 lukem objectClass: top
353 1.1 lukem objectClass: person
354 1.1 lukem givenName;lang-de-DE: Johann
355 1.1 lukem CN: Johann Sibelius
356 1.1 lukem SN: Sibelius
357 1.1 lukem
358 1.1 lukem would cause the server to return compareTrue.
359 1.1 lukem
360 1.1 lukem However, if the client issued a compare request of type
361 1.1 lukem "name;lang-de" and assertion value "Johann" against the above entry,
362 1.1 lukem the request would fail with the noSuchAttributeType error.
363 1.1 lukem
364 1.1 lukem If the server does not support storing attributes with language tag
365 1.1 lukem options in the DIT, then any comparison which includes a language tag
366 1.1 lukem option will always fail to locate an attribute, and
367 1.1 lukem noSuchAttributeType will be returned.
368 1.1 lukem
369 1.1 lukem 2.5. Add Operation
370 1.1 lukem
371 1.1 lukem Clients can provide language options in AttributeDescription in
372 1.1 lukem attributes of a new entry to be created.
373 1.1 lukem
374 1.1 lukem A client can provide multiple attributes with the same attribute type
375 1.1 lukem and value, so long as each attribute has a different set of language
376 1.1 lukem tag options.
377 1.1 lukem
378 1.1 lukem For example, the following is a valid request:
379 1.1 lukem
380 1.1 lukem dn: CN=John Smith,DC=example,DC=com
381 1.1 lukem objectClass: residentialPerson
382 1.1 lukem CN: John Smith
383 1.1 lukem CN;lang-en: John Smith
384 1.1 lukem SN: Smith
385 1.1 lukem SN;lang-en: Smith
386 1.1 lukem streetAddress: 1 University Street
387 1.1 lukem streetAddress;lang-en-US: 1 University Street
388 1.1 lukem streetAddress;lang-fr: 1 rue Universite
389 1.1 lukem houseIdentifier;lang-fr: 9e etage
390 1.1 lukem
391 1.1 lukem If a server does not support storing language tag options with
392 1.1 lukem attribute values in the DIT, then it MUST treat an
393 1.1 lukem AttributeDescription with a language tag option as an unrecognized
394 1.1 lukem attribute. If the server forbids the addition of unrecognized
395 1.1 lukem attributes then it MUST fail the add request with an appropriate
396 1.1 lukem result code.
397 1.1 lukem
398 1.1 lukem
399 1.1 lukem
400 1.1 lukem Zeilenga Standards Track [Page 7]
401 1.1 lukem
403 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
404 1.1 lukem
405 1.1 lukem
406 1.1 lukem 2.6. Modify Operation
407 1.1 lukem
408 1.1 lukem A client can provide language tag options in an AttributeDescription
409 1.1 lukem as part of a modification element in the modify operation.
410 1.1 lukem
411 1.1 lukem Attribute types and language tag options MUST match exactly against
412 1.1 lukem values stored in the directory. For example, if the modification is
413 1.1 lukem a "delete", then if the stored values to be deleted have language tag
414 1.1 lukem options, then those language tag options MUST be provided in the
415 1.1 lukem modify operation, and if the stored values to be deleted do not have
416 1.1 lukem any language tag option, then no language tag option is to be
417 1.1 lukem provided.
418 1.1 lukem
419 1.1 lukem If the server does not support storing language tag options with
420 1.1 lukem attribute values in the DIT, then it MUST treat an
421 1.1 lukem AttributeDescription with a language tag option as an unrecognized
422 1.1 lukem attribute, and MUST fail the request with an appropriate result code.
423 1.1 lukem
424 1.1 lukem 3. Use of Language Ranges in LDAP
425 1.1 lukem
426 1.1 lukem Since the publication of RFC 2596, it has become apparent that there
427 1.1 lukem is a need to provide a mechanism for a client to request attributes
428 1.1 lukem based upon set of language tag options whose tags all begin with the
429 1.1 lukem same sequence of language sub-tags.
430 1.1 lukem
431 1.1 lukem AttributeDescriptions containing language range options are intended
432 1.1 lukem to be used in attribute value assertions, search attribute lists, and
433 1.1 lukem other places where the client desires to provide an attribute
434 1.1 lukem description matching of a range of language tags associated with
435 1.1 lukem attributes.
436 1.1 lukem
437 1.1 lukem A language range option conforms to the following ABNF [RFC2234]:
438 1.1 lukem
439 1.1 lukem language-range-option = "lang-" [ Language-Tag "-" ]
440 1.1 lukem
441 1.1 lukem where the Language-Tag production is as defined in BCP 47 [RFC3066].
442 1.1 lukem This production and those it imports from [RFC2234] are provided in
443 1.1 lukem Section 2.1 for convenience.
444 1.1 lukem
445 1.1 lukem A language range option matches a language tag option if the language
446 1.1 lukem range option less the trailing "-" matches exactly the language tag
447 1.1 lukem or if the language range option (including the trailing "-") matches
448 1.1 lukem a prefix of the language tag option. Note that the language range
449 1.1 lukem option "lang-" matches all language tag options.
450 1.1 lukem
451 1.1 lukem
452 1.1 lukem
453 1.1 lukem
454 1.1 lukem
455 1.1 lukem
456 1.1 lukem
457 1.1 lukem Zeilenga Standards Track [Page 8]
458 1.1 lukem
460 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
461 1.1 lukem
462 1.1 lukem
463 1.1 lukem Examples of valid AttributeDescription containing language range
464 1.1 lukem options:
465 1.1 lukem
466 1.1 lukem givenName;lang-en-
467 1.1 lukem CN;lang-
468 1.1 lukem SN;lang-de-;lang-gem-
469 1.1 lukem O;lang-x-;x-foobar
470 1.1 lukem
471 1.1 lukem A language range option is not a tagging option. Attributes cannot
472 1.1 lukem be stored with language range options. Any attempt to add or update
473 1.1 lukem an attribute description with a language range option SHALL be
474 1.1 lukem treated as an undefined attribute type and result in an error.
475 1.1 lukem
476 1.1 lukem A language range option has no effect on the transfer encoding nor on
477 1.1 lukem the syntax of the attribute values.
478 1.1 lukem
479 1.1 lukem Servers SHOULD support assertion of language ranges for any attribute
480 1.1 lukem type which they allow to be stored with language tags.
481 1.1 lukem
482 1.1 lukem 3.1. Search Filter
483 1.1 lukem
484 1.1 lukem If a language range option is present in an AttributeDescription in
485 1.1 lukem an assertion, then for each entry within scope, the values of each
486 1.1 lukem attribute whose AttributeDescription consists of the same attribute
487 1.1 lukem type or its subtypes and contains a language tag option matching the
488 1.1 lukem language range option are to be returned.
489 1.1 lukem
490 1.1 lukem Thus, for example, a filter of an equality match of type
491 1.1 lukem "name;lang-en-" and assertion value "Billy Ray", against the
492 1.1 lukem following directory entry:
493 1.1 lukem
494 1.1 lukem dn: SN=Ray,DC=example,DC=com
495 1.1 lukem objectClass: person DOES NOT MATCH (wrong type)
496 1.1 lukem objectClass: extensibleObject DOES NOT MATCH (wrong type)
497 1.1 lukem name;lang-en-US: Billy Ray MATCHES
498 1.1 lukem name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value)
499 1.1 lukem CN;lang-en-US: Billy Ray MATCHES
500 1.1 lukem CN;lang-en-US;x-foobar: Billy Ray MATCHES
501 1.1 lukem CN;lang-en;x-foobar: Billy Ray MATCHES
502 1.1 lukem CN;x-foobar: Billy Ray DOES NOT MATCH (no lang-)
503 1.1 lukem name: Billy Ray DOES NOT MATCH (no lang-)
504 1.1 lukem SN;lang-en-GB;lang-en-US: Billy Ray MATCHES
505 1.1 lukem SN: Ray DOES NOT MATCH (no lang-,
506 1.1 lukem wrong value)
507 1.1 lukem
508 1.1 lukem Note that "CN" and "SN" are subtypes of "name".
509 1.1 lukem
510 1.1 lukem
511 1.1 lukem
512 1.1 lukem
513 1.1 lukem
514 1.1 lukem Zeilenga Standards Track [Page 9]
515 1.1 lukem
517 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
518 1.1 lukem
519 1.1 lukem
520 1.1 lukem If the server does not support storing attributes with language tag
521 1.1 lukem options in the DIT, then any assertion which includes a language
522 1.1 lukem range option will not match as it is an unrecognized attribute type.
523 1.1 lukem No error would be returned because of this; a presence filter would
524 1.1 lukem evaluate to FALSE and all other assertions to Undefined.
525 1.1 lukem
526 1.1 lukem 3.2. Requested Attributes in Search
527 1.1 lukem
528 1.1 lukem Clients can provide language range options in each
529 1.1 lukem AttributeDescription in the requested attribute list in a search
530 1.1 lukem request.
531 1.1 lukem
532 1.1 lukem If a language range option is provided in an attribute description,
533 1.1 lukem then only attributes in a directory entry whose attribute
534 1.1 lukem descriptions have the same attribute type or its subtype and a
535 1.1 lukem language tag option matching the provided language range option are
536 1.1 lukem to be returned. Thus if a client requests just the attribute
537 1.1 lukem "name;lang-en-", the server would return "name;lang-en-US" and
538 1.1 lukem "CN;lang-en;lang-ja" but not "SN" nor "name;lang-fr".
539 1.1 lukem
540 1.1 lukem Clients can provide in the attribute list multiple
541 1.1 lukem AttributeDescriptions which have the same base attribute type but
542 1.1 lukem different options. For example a client could provide both
543 1.1 lukem "name;lang-en-" and "name;lang-fr-", and this would permit an
544 1.1 lukem attribute whose type was name or subtype of name and with a language
545 1.1 lukem tag option matching either language range option to be returned.
546 1.1 lukem
547 1.1 lukem If a server does not support storing attributes with language tag
548 1.1 lukem options in the DIT, then any attribute descriptions in the list which
549 1.1 lukem include language range options are to be ignored, just as if they
550 1.1 lukem were unknown attribute types.
551 1.1 lukem
552 1.1 lukem 3.3. Compare
553 1.1 lukem
554 1.1 lukem Language range options can be present in an AttributeDescription used
555 1.1 lukem in a compare request AttributeValueAssertion. This is to be treated
556 1.1 lukem by servers the same as the use of language range options in a search
557 1.1 lukem filter with an equality match, as described in Section 3.1. If there
558 1.1 lukem is no attribute in the entry with the same subtype and a matching
559 1.1 lukem language tag option, the noSuchAttributeType error will be returned.
560 1.1 lukem
561 1.1 lukem Thus, for example, a compare request of type "name;lang-" and
562 1.1 lukem assertion value "Johann", against the entry with the following
563 1.1 lukem attributes:
564 1.1 lukem
565 1.1 lukem
566 1.1 lukem
567 1.1 lukem
568 1.1 lukem
569 1.1 lukem
570 1.1 lukem
571 1.1 lukem Zeilenga Standards Track [Page 10]
572 1.1 lukem
574 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
575 1.1 lukem
576 1.1 lukem
577 1.1 lukem objectClass: top
578 1.1 lukem objectClass: person
579 1.1 lukem givenName;lang-de-DE: Johann
580 1.1 lukem CN: Johann Sibelius
581 1.1 lukem SN: Sibelius
582 1.1 lukem
583 1.1 lukem will cause the server to return compareTrue. (Note that the language
584 1.1 lukem range option "lang-" matches any language tag option.)
585 1.1 lukem
586 1.1 lukem However, if the client issued a compare request of type
587 1.1 lukem "name;lang-de" and assertion value "Sibelius" against the above
588 1.1 lukem entry, the request would fail with the noSuchAttributeType error.
589 1.1 lukem
590 1.1 lukem If the server does not support storing attributes with language tag
591 1.1 lukem options in the DIT, then any comparison which includes a language
592 1.1 lukem range option will always fail to locate an attribute, and
593 1.1 lukem noSuchAttributeType will be returned.
594 1.1 lukem
595 1.1 lukem 4. Discovering Language Option Support
596 1.1 lukem
597 1.1 lukem A server SHOULD indicate that it supports storing attributes with
598 1.1 lukem language tag options in the DIT by publishing 1.3.6.1.4.1.4203.1.5.4
599 1.1 lukem as a value of the root DSE.
600 1.1 lukem
601 1.1 lukem A server SHOULD indicate that it supports language range matching of
602 1.1 lukem attributes with language tag options stored in the DIT by publishing
603 1.1 lukem 1.3.6.1.4.1.4203.1.5.5 as a value of the "supportedFeatures"
604 1.1 lukem [RFC3674] attribute in the root DSE.
605 1.1 lukem
606 1.1 lukem A server MAY restrict use of language tag options to a subset of the
607 1.1 lukem attribute types it recognizes. This document does not define a
608 1.1 lukem mechanism for determining which subset of attribute types can be used
609 1.1 lukem with language tag options.
610 1.1 lukem
611 1.1 lukem 5. Interoperability with Non-supporting Implementations
612 1.1 lukem
613 1.1 lukem Implementators of this specification should take care that their use
614 1.1 lukem of language tag options does not impede proper function of
615 1.1 lukem implementations which do not support language tags.
616 1.1 lukem
617 1.1 lukem Per RFC 2251, "an AttributeDescription with one or more options is
618 1.1 lukem treated as a subtype of the attribute type without any options." A
619 1.1 lukem non-supporting server will treat an AttributeDescription with any
620 1.1 lukem language tag options as an unrecognized attribute type. A non-
621 1.1 lukem supporting client will either do the same, or will treat the
622 1.1 lukem AttributeDescription as it would any other unknown subtype.
623 1.1 lukem Typically, non-supporting clients simply ignore unrecognized subtypes
624 1.1 lukem (and unrecognized attribute types) of attributes they request.
625 1.1 lukem
626 1.1 lukem
627 1.1 lukem
628 1.1 lukem Zeilenga Standards Track [Page 11]
629 1.1 lukem
631 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
632 1.1 lukem
633 1.1 lukem
634 1.1 lukem To ensure proper function of non-supporting clients, supporting
635 1.1 lukem clients SHOULD ensure that entries they populate with tagged values
636 1.1 lukem are also populated with non-tagged values.
637 1.1 lukem
638 1.1 lukem Additionally, supporting clients SHOULD be prepared to handle entries
639 1.1 lukem which are not populated with tagged values.
640 1.1 lukem
641 1.1 lukem 6. Security Considerations
642 1.1 lukem
643 1.1 lukem Language tags and range options are used solely to indicate the
644 1.1 lukem native language of values and in querying the directory for values
645 1.1 lukem which fulfill the user's language needed. These options are not
646 1.1 lukem known to raise specific security considerations. However, the reader
647 1.1 lukem should consider general directory security issues detailed in the
648 1.1 lukem LDAP technical specification [RFC3377].
649 1.1 lukem
650 1.1 lukem 7. IANA Considerations
651 1.1 lukem
652 1.1 lukem Registration of these protocol mechanisms [RFC3383] has been
653 1.1 lukem completed by the IANA.
654 1.1 lukem
655 1.1 lukem Subject: Request for LDAP Protocol Mechanism Registration
656 1.1 lukem Object Identifier: 1.3.6.1.4.1.4203.1.5.4
657 1.1 lukem Description: Language Tag Options
658 1.1 lukem Object Identifier: 1.3.6.1.4.1.4203.1.5.5
659 1.1 lukem Description: Language Range Options
660 1.1 lukem Person & email address to contact for further information:
661 1.1 lukem Kurt Zeilenga <kurt (a] openldap.org>
662 1.1 lukem Usage: Feature
663 1.1 lukem Specification: RFC 3866
664 1.1 lukem Author/Change Controller: IESG
665 1.1 lukem Comments: none
666 1.1 lukem
667 1.1 lukem These OIDs were assigned [ASSIGN] by OpenLDAP Foundation, under its
668 1.1 lukem IANA-assigned private enterprise allocation [PRIVATE], for use in
669 1.1 lukem this specification.
670 1.1 lukem
671 1.1 lukem 8. Acknowledgments
672 1.1 lukem
673 1.1 lukem This document is a revision of RFC 2596 by Mark Wahl and Tim Howes.
674 1.1 lukem RFC 2596 was a product of the IETF ASID and LDAPEXT working groups.
675 1.1 lukem This document also borrows from a number of IETF documents including
676 1.1 lukem BCP 47 by H. Alvestrand.
677 1.1 lukem
678 1.1 lukem
679 1.1 lukem
680 1.1 lukem
681 1.1 lukem
682 1.1 lukem
683 1.1 lukem
684 1.1 lukem
685 1.1 lukem Zeilenga Standards Track [Page 12]
686 1.1 lukem
688 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
689 1.1 lukem
690 1.1 lukem
691 1.1 lukem 9. References
692 1.1 lukem
693 1.1 lukem 9.1. Normative References
694 1.1 lukem
695 1.1 lukem [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
696 1.1 lukem Requirement Levels", BCP 14, RFC 2119, March 1997.
697 1.1 lukem
698 1.1 lukem [RFC2234] Crocker, D., Ed. and P. Overell, "Augmented BNF for
699 1.1 lukem Syntax Specifications: ABNF", RFC 2234, November 1997.
700 1.1 lukem
701 1.1 lukem [RFC2251] Wahl, M., Howes, T. and S. Kille, "Lightweight
702 1.1 lukem Directory Access Protocol (v3)", RFC 2251, December
703 1.1 lukem 1997.
704 1.1 lukem
705 1.1 lukem [RFC3066] Alvestrand, H., "Tags for the Identification of
706 1.1 lukem Languages", BCP 47, RFC 3066, January 2001.
707 1.1 lukem
708 1.1 lukem [RFC3377] Hodges, J. and R. Morgan, "Lightweight Directory Access
709 1.1 lukem Protocol (v3): Technical Specification", RFC 3377,
710 1.1 lukem September 2002.
711 1.1 lukem
712 1.1 lukem [RFC3674] Zeilenga, K., "Feature Discovery in Lightweight
713 1.1 lukem Directory Access Protocol (LDAP)", RFC 3674, December
714 1.1 lukem 2003.
715 1.1 lukem
716 1.1 lukem [ASCII] Coded Character Set--7-bit American Standard Code for
717 1.1 lukem Information Interchange, ANSI X3.4-1986.
718 1.1 lukem
719 1.1 lukem 9.2. Informative References
720 1.1 lukem
721 1.1 lukem [X.501] International Telecommunication Union -
722 1.1 lukem Telecommunication Standardization Sector, "The
723 1.1 lukem Directory -- Models," X.501(1997).
724 1.1 lukem
725 1.1 lukem [RFC3383] Zeilenga, K., "Internet Assigned Numbers Authority
726 1.1 lukem (IANA) Considerations for Lightweight Directory Access
727 1.1 lukem Protocol (LDAP)", BCP 64, RFC 3383, September 2002.
728 1.1 lukem
729 1.1 lukem [ASSIGN] OpenLDAP Foundation, "OpenLDAP OID Delegations",
730 1.1 lukem http://www.openldap.org/foundation/oid-delegate.txt.
731 1.1 lukem
732 1.1 lukem [PRIVATE] IANA, "Private Enterprise Numbers",
733 1.1 lukem http://www.iana.org/assignments/enterprise-numbers.
734 1.1 lukem
735 1.1 lukem
736 1.1 lukem
737 1.1 lukem
738 1.1 lukem
739 1.1 lukem
740 1.1 lukem
741 1.1 lukem
742 1.1 lukem Zeilenga Standards Track [Page 13]
743 1.1 lukem
745 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
746 1.1 lukem
747 1.1 lukem
748 1.1 lukem Appendix A. Differences from RFC 2596
749 1.1 lukem
750 1.1 lukem This document adds support for language ranges, provides a mechanism
751 1.1 lukem that a client can use to discover whether a server supports language
752 1.1 lukem tags and ranges, and clarifies how attributes with multiple language
753 1.1 lukem tags are to be treated. This document is a significant rewrite of
754 1.1 lukem RFC 2596.
755 1.1 lukem
756 1.1 lukem Appendix B. Differences from X.500(1997)
757 1.1 lukem
758 1.1 lukem X.500(1997) [X.501] defines a different mechanism, contexts, as the
759 1.1 lukem means of representing language tags (codes). This section summarizes
760 1.1 lukem the major differences in approach.
761 1.1 lukem
762 1.1 lukem a) An X.500 operation which has specified a language code on a value
763 1.1 lukem matches a value in the directory without a language code.
764 1.1 lukem
765 1.1 lukem b) LDAP references BCP 47 [RFC3066], which allows for IANA
766 1.1 lukem registration of new tags as well as unregistered tags.
767 1.1 lukem
768 1.1 lukem c) LDAP supports language ranges (new in this revision).
769 1.1 lukem
770 1.1 lukem d) LDAP does not allow language tags (and ranges) in distinguished
771 1.1 lukem names.
772 1.1 lukem
773 1.1 lukem e) X.500 describes subschema administration procedures to allow
774 1.1 lukem language codes to be associated with particular attributes types.
775 1.1 lukem
776 1.1 lukem Editor's Address
777 1.1 lukem
778 1.1 lukem Kurt D. Zeilenga
779 1.1 lukem OpenLDAP Foundation
780 1.1 lukem
781 1.1 lukem EMail: Kurt (a] OpenLDAP.org
782 1.1 lukem
783 1.1 lukem
784 1.1 lukem
785 1.1 lukem
786 1.1 lukem
787 1.1 lukem
788 1.1 lukem
789 1.1 lukem
790 1.1 lukem
791 1.1 lukem
792 1.1 lukem
793 1.1 lukem
794 1.1 lukem
795 1.1 lukem
796 1.1 lukem
797 1.1 lukem
798 1.1 lukem
799 1.1 lukem Zeilenga Standards Track [Page 14]
800 1.1 lukem
802 1.1 lukem RFC 3866 Language Tags and Ranges in LDAP July 2004
803 1.1 lukem
804 1.1 lukem
805 1.1 lukem Full Copyright Statement
806 1.1 lukem
807 1.1 lukem Copyright (C) The Internet Society (2004). This document is subject
808 1.1 lukem to the rights, licenses and restrictions contained in BCP 78, and
809 1.1 lukem except as set forth therein, the authors retain all their rights.
810 1.1 lukem
811 1.1 lukem This document and the information contained herein are provided on an
812 1.1 lukem "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
813 1.1 lukem OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
814 1.1 lukem ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
815 1.1 lukem INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
816 1.1 lukem INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
817 1.1 lukem WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
818 1.1 lukem
819 1.1 lukem Intellectual Property
820 1.1 lukem
821 1.1 lukem The IETF takes no position regarding the validity or scope of any
822 1.1 lukem Intellectual Property Rights or other rights that might be claimed to
823 1.1 lukem pertain to the implementation or use of the technology described in
824 1.1 lukem this document or the extent to which any license under such rights
825 1.1 lukem might or might not be available; nor does it represent that it has
826 1.1 lukem made any independent effort to identify any such rights. Information
827 1.1 lukem on the procedures with respect to rights in RFC documents can be
828 1.1 lukem found in BCP 78 and BCP 79.
829 1.1 lukem
830 1.1 lukem Copies of IPR disclosures made to the IETF Secretariat and any
831 1.1 lukem assurances of licenses to be made available, or the result of an
832 1.1 lukem attempt made to obtain a general license or permission for the use of
833 1.1 lukem such proprietary rights by implementers or users of this
834 1.1 lukem specification can be obtained from the IETF on-line IPR repository at
835 1.1 lukem http://www.ietf.org/ipr.
836 1.1 lukem
837 1.1 lukem The IETF invites any interested party to bring to its attention any
838 1.1 lukem copyrights, patents or patent applications, or other proprietary
839 1.1 lukem rights that may cover technology that may be required to implement
840 1.1 lukem this standard. Please address the information to the IETF at ietf-
841 1.1 lukem ipr (a] ietf.org.
842 1.1 lukem
843 1.1 lukem Acknowledgement
844
845 Funding for the RFC Editor function is currently provided by the
846 Internet Society.
847
848
849
850
851
852
853
854
855
856 Zeilenga Standards Track [Page 15]
857
859