draft-ietf-ltru-matching-14.txt   draft-ietf-ltru-matching-15.txt 
Network Working Group A. Phillips, Ed. Network Working Group A. Phillips, Ed.
Internet-Draft Yahoo! Inc. Internet-Draft Yahoo! Inc.
Obsoletes: 3066 (if approved) M. Davis, Ed. Obsoletes: 3066 (if approved) M. Davis, Ed.
Expires: November 30, 2006 Google Expires: December 24, 2006 Google
May 29, 2006 June 22, 2006
Matching of Language Tags Matching of Language Tags
draft-ietf-ltru-matching-14 draft-ietf-ltru-matching-15
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 35 skipping to change at page 1, line 35
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on November 30, 2006. This Internet-Draft will expire on December 24, 2006.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The Internet Society (2006).
Abstract Abstract
This document describes a syntax, called a "language-range", for This document describes a syntax, called a "language-range", for
specifying items in a user's language preferences, called a "language specifying items in a user's list of language preferences. It also
priority list". It also describes different mechanisms for comparing describes different mechanisms for comparing and matching these to
and matching these to language tags. Two kinds of matching language tags. Two kinds of matching mechanisms, filtering and
mechanisms, filtering and lookup, are defined. Filtering produces a lookup, are defined. Filtering produces a (potentially empty) set of
(potentially empty) set of language tags, whereas lookup produces a language tags, whereas lookup produces a single language tag.
single language tag. Possible applications include language Possible applications include language negotiation or content
negotiation or content selection. This document, in combination with selection. This document, in combination with RFC 3066bis (Ed.:
RFC 3066bis (Ed.: replace "3066bis" with the RFC number assigned to replace "3066bis" with the RFC number assigned to
draft-ietf-ltru-registry-14), replaces RFC 3066, which replaced RFC draft-ietf-ltru-registry-14), replaces RFC 3066, which replaced RFC
1766. 1766.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. The Language Range . . . . . . . . . . . . . . . . . . . . . . 4 2. The Language Range . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Basic Language Range . . . . . . . . . . . . . . . . . . . 4 2.1. Basic Language Range . . . . . . . . . . . . . . . . . . . 4
2.2. Extended Language Range . . . . . . . . . . . . . . . . . 5 2.2. Extended Language Range . . . . . . . . . . . . . . . . . 5
2.3. The Language Priority List . . . . . . . . . . . . . . . . 5 2.3. The Language Priority List . . . . . . . . . . . . . . . . 5
skipping to change at page 2, line 35 skipping to change at page 2, line 35
4.1. Choosing Language Ranges . . . . . . . . . . . . . . . . . 16 4.1. Choosing Language Ranges . . . . . . . . . . . . . . . . . 16
4.2. Meaning of Language Tags and Ranges . . . . . . . . . . . 17 4.2. Meaning of Language Tags and Ranges . . . . . . . . . . . 17
4.3. Considerations for Private Use Subtags . . . . . . . . . . 17 4.3. Considerations for Private Use Subtags . . . . . . . . . . 17
4.4. Length Considerations for Language Ranges . . . . . . . . 18 4.4. Length Considerations for Language Ranges . . . . . . . . 18
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19
6. Security Considerations . . . . . . . . . . . . . . . . . . . 20 6. Security Considerations . . . . . . . . . . . . . . . . . . . 20
7. Character Set Considerations . . . . . . . . . . . . . . . . . 21 7. Character Set Considerations . . . . . . . . . . . . . . . . . 21
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22
8.1. Normative References . . . . . . . . . . . . . . . . . . . 22 8.1. Normative References . . . . . . . . . . . . . . . . . . . 22
8.2. Informative References . . . . . . . . . . . . . . . . . . 22 8.2. Informative References . . . . . . . . . . . . . . . . . . 22
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 23 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 23
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24
Intellectual Property and Copyright Statements . . . . . . . . . . 25 Intellectual Property and Copyright Statements . . . . . . . . . . 25
1. Introduction 1. Introduction
Human beings on our planet have, past and present, used a number of Human beings on our planet have, past and present, used a number of
languages. There are many reasons why one would want to identify the languages. There are many reasons why one would want to identify the
language used when presenting or requesting information. language used when presenting or requesting information.
Applications, protocols, or specifications that use language Applications, protocols, or specifications that use language
skipping to change at page 5, line 23 skipping to change at page 5, line 23
that contain the region subtag 'CH' (Switzerland). Extended language that contain the region subtag 'CH' (Switzerland). Extended language
ranges are useful for specifying a particular sequence of subtags ranges are useful for specifying a particular sequence of subtags
that appear in the set of matching tags without having to specify all that appear in the set of matching tags without having to specify all
of the intervening subtags. of the intervening subtags.
An extended language range can be represented by the following ABNF: An extended language range can be represented by the following ABNF:
extended-language-range = (1*8ALPHA / "*") extended-language-range = (1*8ALPHA / "*")
*("-" (1*8alphanum / "*")) *("-" (1*8alphanum / "*"))
Figure 2: Extended Language Range
The wildcard subtag '*' can occur in any position in the extended The wildcard subtag '*' can occur in any position in the extended
language range, where it matches any sequence of subtags that might language range, where it matches any sequence of subtags that might
occur in that position in a language tag. However, wildcards outside occur in that position in a language tag. However, wildcards outside
the first position are ignored by Extended Filtering (see Section the first position are ignored by Extended Filtering (see Section
3.2.2). The use or absence of one or more wildcards cannot be taken 3.2.2). The use or absence of one or more wildcards cannot be taken
to imply that a certain number of subtags will appear in the matching to imply that a certain number of subtags will appear in the matching
set of language tags. set of language tags.
2.3. The Language Priority List 2.3. The Language Priority List
skipping to change at page 13, line 36 skipping to change at page 13, line 36
In the lookup scheme, the language range is progressively truncated In the lookup scheme, the language range is progressively truncated
from the end until a matching language tag is located. Single letter from the end until a matching language tag is located. Single letter
or digit subtags (including both the letter 'x' which introduces or digit subtags (including both the letter 'x' which introduces
private-use sequences, and the subtags that introduce extensions) are private-use sequences, and the subtags that introduce extensions) are
removed at the same time as their closest trailing subtag. For removed at the same time as their closest trailing subtag. For
example, starting with the range "zh-Hant-CN-x-private1-private2" example, starting with the range "zh-Hant-CN-x-private1-private2"
(Chinese, Traditional script, China, two private use tags) the lookup (Chinese, Traditional script, China, two private use tags) the lookup
progressively searches for content as shown below: progressively searches for content as shown below:
Example of a Lookup Fallback Pattern
Range to match: zh-Hant-CN-x-private1-private2 Range to match: zh-Hant-CN-x-private1-private2
1. zh-Hant-CN-x-private1-private2 1. zh-Hant-CN-x-private1-private2
2. zh-Hant-CN-x-private1 2. zh-Hant-CN-x-private1
3. zh-Hant-CN 3. zh-Hant-CN
4. zh-Hant 4. zh-Hant
5. zh 5. zh
6. (default) 6. (default)
Figure 3: Example of a Lookup Fallback Pattern
This fallback behavior allows some flexibility in finding a match. This fallback behavior allows some flexibility in finding a match.
Without fallback, the default content would be returned immediately Without fallback, the default content would be returned immediately
if exactly matching content is unavailable. With fallback, a result if exactly matching content is unavailable. With fallback, a result
more closely matching the user request can be provided. more closely matching the user request can be provided.
Extensions and unrecognized private-use subtags might be unrelated to Extensions and unrecognized private-use subtags might be unrelated to
a particular application of lookup. Since these subtags come at the a particular application of lookup. Since these subtags come at the
end of the subtag sequence, they are removed first during the end of the subtag sequence, they are removed first during the
fallback process and usually pose no barrier to interoperability. fallback process and usually pose no barrier to interoperability.
However, an implementation MAY remove these from ranges prior to However, an implementation MAY remove these from ranges prior to
skipping to change at page 15, line 6 skipping to change at page 15, line 6
Each application, protocol, or specification that uses lookup MUST Each application, protocol, or specification that uses lookup MUST
define the defaulting behavior when no tag matches the language define the defaulting behavior when no tag matches the language
priority list. What this action consists of strongly depends on how priority list. What this action consists of strongly depends on how
lookup is being applied. Some examples of defaulting behavior lookup is being applied. Some examples of defaulting behavior
include: include:
o return an item with no language tag or an item of a non-linguistic o return an item with no language tag or an item of a non-linguistic
nature, such as an image or sound nature, such as an image or sound
o return a null string as the language tag value, in cases where the o return a null string as the language tag value, in cases where the
protocol permits the empty value (see, for example, "xml:lang" in protocol permits the empty value (see, for example, "xml:lang" in
[W3C.REC-xml-20040204]) [XML10])
o return a particular language tag designated for the operation o return a particular language tag designated for the operation
o return the language tag "i-default" (see: [RFC2277]) o return the language tag "i-default" (see: [RFC2277])
o return an error condition or error message o return an error condition or error message
o return a list of available languages for the user to select from o return a list of available languages for the user to select from
When performing lookup using a language priority list, the When performing lookup using a language priority list, the
skipping to change at page 15, line 38 skipping to change at page 15, line 38
list as a whole, rather than after each item in the language priority list as a whole, rather than after each item in the language priority
list. The application, protocol, or specification MUST also define list. The application, protocol, or specification MUST also define
the defaulting behavior if that search fails to find a matching tag the defaulting behavior if that search fails to find a matching tag
or item. or item.
For example, if a particular user's language priority list is "fr-FR, For example, if a particular user's language priority list is "fr-FR,
zh-Hant" (French as used in France followed by Chinese as written in zh-Hant" (French as used in France followed by Chinese as written in
the Traditional script) and the program doing the matching had a the Traditional script) and the program doing the matching had a
default language range of "ja-JP" (Japanese as used in Japan), then default language range of "ja-JP" (Japanese as used in Japan), then
the program searches as follows: the program searches as follows:
1. fr-FR 1. fr-FR
2. fr 2. fr
3. zh-Hant // next language 3. zh-Hant // next language
4. zh 4. zh
5. ja-JP // now searching for the default content 5. ja-JP // now searching for the default content
6. ja 6. ja
7. (implementation defined default) 7. (implementation defined default)
Figure 4: Lookup Using a Language Priority List
4. Other Considerations 4. Other Considerations
When working with language ranges and matching schemes, there are When working with language ranges and matching schemes, there are
some additional points that can influence the choice of either. some additional points that can influence the choice of either.
4.1. Choosing Language Ranges 4.1. Choosing Language Ranges
Users indicate their language preferences via the choice of a Users indicate their language preferences via the choice of a
language range or the list of language ranges in a language priority language range or the list of language ranges in a language priority
list. The type of matching affects what the best choice is for a list. The type of matching affects what the best choice is for a
skipping to change at page 17, line 44 skipping to change at page 17, line 44
Selecting language tags using language ranges requires some Selecting language tags using language ranges requires some
understanding by users of what they are selecting. The meaning of understanding by users of what they are selecting. The meaning of
the various subtags in a language range are identical to their the various subtags in a language range are identical to their
meaning in a language tag (see Section 4.2 in [RFC3066bis]), with the meaning in a language tag (see Section 4.2 in [RFC3066bis]), with the
addition that the wildcard "*" represents any matching sequence of addition that the wildcard "*" represents any matching sequence of
values. values.
4.3. Considerations for Private Use Subtags 4.3. Considerations for Private Use Subtags
Private argeement is necessary between the parties that intend to use Private agreement is necessary between the parties that intend to use
or exchange language tags that contain private-use subtags. Great or exchange language tags that contain private-use subtags. Great
caution SHOULD be used in employing private-use subtags in content or caution SHOULD be used in employing private-use subtags in content or
protocols intended for general use. Private-use subtags are simply protocols intended for general use. Private-use subtags are simply
useless for information exchange without prior arrangement. useless for information exchange without prior arrangement.
The value and semantic meaning of private-use tags and of the subtags The value and semantic meaning of private-use tags and of the subtags
used within such a language tag are not defined. Matching private- used within such a language tag are not defined. Matching private-
use tags using language ranges or extended language ranges can result use tags using language ranges or extended language ranges can result
in unpredictable content being returned. in unpredictable content being returned.
skipping to change at page 22, line 43 skipping to change at page 22, line 43
[RFC2616errata] [RFC2616errata]
IETF, "HTTP/1.1 Specification Errata", October 2004, IETF, "HTTP/1.1 Specification Errata", October 2004,
<http://purl.org/NET/http-errata>. <http://purl.org/NET/http-errata>.
[RFC3066] Alvestrand, H., "Tags for the Identification of [RFC3066] Alvestrand, H., "Tags for the Identification of
Languages", BCP 47, RFC 3066, January 2001. Languages", BCP 47, RFC 3066, January 2001.
[RFC3282] Alvestrand, H., "Content Language Headers", RFC 3282, [RFC3282] Alvestrand, H., "Content Language Headers", RFC 3282,
May 2002. May 2002.
[W3C.REC-xml-20040204] [XML10] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and
Yergeau, F., Paoli, J., Sperberg-McQueen, C., Bray, T., F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third
and E. Maler, "Extensible Markup Language (XML) 1.0 (Third Edition)", World Wide Web Consortium Recommendation,
Edition)", W3C REC REC-xml-20040204, February 2004. February 2004, <http://www.w3.org/TR/REC-xml>.
Appendix A. Acknowledgements Appendix A. Acknowledgments
Any list of contributors is bound to be incomplete; please regard the Any list of contributors is bound to be incomplete; please regard the
following as only a selection from the group of people who have following as only a selection from the group of people who have
contributed to make this document what it is today. contributed to make this document what it is today.
The contributors to [RFC3066bis], [RFC3066] and [RFC1766], each of The contributors to [RFC1766] and [RFC3066], each of which was a
which is a precursor to this document, made enormous contributions precursor to this document, contributed greatly to the development of
directly or indirectly to this document and are generally responsible language tag matching, and, in particular, the basic language range
for the success of language tags. and the basic matching scheme. This document was originally part of
[RFC3066bis], but was split off before that document's completion.
Thus, directly or indirectly, those acknowledged in [RFC3066bis] also
had a hand in the development of this document, and work done prior
to the split is acknowledged in that document.
The following people (in alphabetical order by family name) The following people (in alphabetical order by family name)
contributed to this document: contributed to this document:
Harald Alvestrand, Stephane Bortzmeyer, Jeremy Carroll, Peter Harald Alvestrand, Stephane Bortzmeyer, Jeremy Carroll, Peter
Constable, John Cowan, Mark Crispin, Martin Duerst, Frank Ellermann, Constable, John Cowan, Mark Crispin, Martin Duerst, Frank Ellermann,
Doug Ewell, Debbie Garside, Marion Gunn, Jon Hanna, Kent Karlsson, Doug Ewell, Debbie Garside, Marion Gunn, Jon Hanna, Kent Karlsson,
Erkki Kolehmainen, Jukka Korpela, Ira McDonald, M. Patton, Randy Erkki Kolehmainen, Jukka Korpela, Ira McDonald, M. Patton, Randy
Presuhn, Eric van der Poel, Markus Scherer, Misha Wolf, and many, Presuhn, Eric van der Poel, Markus Scherer, Misha Wolf, and many,
many others. many others.
 End of changes. 15 change blocks. 
31 lines changed or deleted 30 lines changed or added

This html diff was produced by rfcdiff 1.32. The latest version is available from http://www.levkowetz.com/ietf/tools/rfcdiff/