Network Working Group K. Zeilenga, Ed. Request for Comments: 3866 OpenLDAP Foundation Obsoletes: 2596 July 2004 Category: Standards Track
Network Working Group K. Zeilenga, Ed. Request for Comments: 3866 OpenLDAP Foundation Obsoletes: 2596 July 2004 Category: Standards Track
Language Tags and Ranges in the Lightweight Directory Access Protocol (LDAP)
轻量级目录访问协议(LDAP)中的语言标记和范围
Status of this Memo
本备忘录的状况
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。
Copyright Notice
版权公告
Copyright (C) The Internet Society (2004).
版权所有(C)互联网协会(2004年)。
Abstract
摘要
It is often desirable to be able to indicate the natural language associated with values held in a directory and to be able to query the directory for values which fulfill the user's language needs. This document details the use of Language Tags and Ranges in the Lightweight Directory Access Protocol (LDAP).
通常希望能够指示与目录中保存的值相关联的自然语言,并能够查询目录中满足用户语言需求的值。本文档详细介绍了轻量级目录访问协议(LDAP)中语言标记和范围的使用。
The Lightweight Directory Access Protocol (LDAP) [RFC3377] provides a means for clients to interrogate and modify information stored in a distributed directory system. The information in the directory is maintained as attributes of entries. Most of these attributes have syntaxes which are human-readable strings, and it is desirable to be able to indicate the natural language associated with attribute values.
轻量级目录访问协议(LDAP)[RFC3377]为客户端提供了一种查询和修改分布式目录系统中存储的信息的方法。目录中的信息作为条目的属性进行维护。这些属性中的大多数都具有人类可读字符串的语法,并且希望能够指示与属性值相关联的自然语言。
This document describes how language tags and ranges [RFC3066] are carried in LDAP and are to be interpreted by LDAP implementations. All LDAP implementations MUST be prepared to accept language tags and ranges.
本文档描述了LDAP中如何携带语言标记和范围[RFC3066],以及LDAP实现如何解释语言标记和范围[RFC3066]。所有LDAP实现都必须准备好接受语言标记和范围。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照BCP 14[RFC2119]中所述进行解释。
This document replaces RFC 2596. Appendix A summaries changes made since RFC 2596.
本文件取代RFC 2596。附录A总结了自RFC 2596以来所做的更改。
Appendix B discusses differences from X.500(1997) "contexts" mechanism.
附录B讨论了与X.500(1997)“上下文”机制的差异。
Appendix A and B are provided for informational purposes only.
附录A和B仅供参考。
The remainder of this section provides a summary of Language Tags, Language Ranges, and Attribute Descriptions.
本节的其余部分提供了语言标记、语言范围和属性描述的摘要。
Section 2 of BCP 47 [RFC3066] describes the language tag format which is used in LDAP. Briefly, it is a string of [ASCII] letters and hyphens. Examples include "fr", "en-US" and "ja-JP". Language tags are case insensitive. That is, the language tag "en-us" is the same as "EN-US".
BCP 47[RFC3066]第2节描述了LDAP中使用的语言标记格式。简而言之,它是由[ASCII]字母和连字符组成的字符串。例如“fr”、“en-US”和“ja-JP”。语言标记不区分大小写。也就是说,语言标签“en-us”与“en-us”相同。
Section 2 of this document details use of language tags in LDAP.
本文档的第2节详细介绍了LDAP中语言标记的使用。
Section 2.5 of BCP 47 [RFC3066] describes the language ranges. Language ranges are used to specify sets of language tags.
BCP 47[RFC3066]第2.5节描述了语言范围。语言范围用于指定语言标记集。
A language range matches a language tag if it is exactly equal to the tag, or if it is exactly equal to a prefix of the tag such that the first character following the prefix is "-". That is, the language range "de" matches the language tags "de" and "de-CH" but not "den". The special language range "*" matches all language tags.
如果语言范围与标记完全相等,或者如果它与标记的前缀完全相等,以致前缀后面的第一个字符是“-”,则该语言范围与语言标记匹配。也就是说,语言范围“de”匹配语言标记“de”和“de CH”,但不匹配“den”。特殊语言范围“*”匹配所有语言标记。
Due to attribute description option naming restrictions in LDAP, this document defines a different language range syntax. However, the semantics of language ranges in LDAP are consistent with BCP 47.
由于LDAP中的属性描述选项命名限制,本文档定义了不同的语言范围语法。但是,LDAP中语言范围的语义与BCP 47一致。
Section 3 of this document details use of language ranges in LDAP.
本文档的第3节详细介绍了LDAP中语言范围的使用。
This section provides an overview of attribute descriptions in LDAP. LDAP attributes and attribute descriptions are defined in [RFC2251].
本节概述LDAP中的属性描述。LDAP属性和属性描述在[RFC2251]中定义。
An attribute consists of a type, a set of zero or more associated tagging options, and a set of one or more values. The type and the options are combined into the AttributeDescription.
属性由一个类型、一组零个或多个关联的标记选项以及一组一个或多个值组成。类型和选项组合到AttributeDescription中。
AttributeDescriptions can also contain options which are not part of the attribute, but indicate some other function (such as range assertion or transfer encoding).
AttributeDescription还可以包含不属于属性的选项,但表示其他一些函数(如范围断言或传输编码)。
An AttributeDescription with one or more tagging options is a direct subtype of each AttributeDescription of the same type with all but one of the tagging options. If the AttributeDescription's type is a direct subtype of some other type, then the AttributeDescription is also a direct subtype of the AttributeDescription which consists of the supertype and all of the tagging options. That is, "CN;x-bar;x-foo" is a direct subtype of "CN;x-bar", "CN;x-foo", and "name;x-bar;x-foo". Note that "CN" is a subtype of "name".
具有一个或多个标记选项的AttributeDescription是具有除一个标记选项以外的所有标记选项的同一类型的每个AttributeDescription的直接子类型。如果AttributeDescription的类型是其他类型的直接子类型,则AttributeDescription也是AttributeDescription的直接子类型,它由超类型和所有标记选项组成。也就是说,“CN;x-bar;x-foo”是“CN;x-bar”、“CN;x-foo”和“name;x-bar;x-foo”的直接子类型。请注意,“CN”是“name”的一个子类型。
This section describes how LDAP implementations MUST interpret language tags in performing operations.
本节介绍LDAP实现在执行操作时必须如何解释语言标记。
Servers which support storing attributes with language tag options in the Directory Information Tree (DIT) SHOULD allow any attribute type it recognizes that has the Directory String, IA5 String, or other textual string syntaxes to have language tag options associated with it. Servers MAY allow language options to be associated with other attributes types.
支持在目录信息树(DIT)中使用语言标记选项存储属性的服务器应允许其识别的具有目录字符串、IA5字符串或其他文本字符串语法的任何属性类型具有与其关联的语言标记选项。服务器可能允许语言选项与其他属性类型关联。
Clients SHOULD NOT assume servers are capable of storing attributes with language tags in the directory.
客户端不应假定服务器能够在目录中存储带有语言标记的属性。
Implementations MUST NOT otherwise interpret the structure of the tag when comparing two tags, and MUST treat them simply as strings of characters. Implementations MUST allow any arbitrary string which conforms to the syntax defined in BCP 47 [RFC3066] to be used as a language tag.
在比较两个标记时,实现不能以其他方式解释标记的结构,必须将它们简单地视为字符串。实现必须允许任何符合BCP 47[RFC3066]中定义的语法的任意字符串用作语言标记。
A language tag option associates a natural language with values of an attribute. An attribute description may contain multiple language tag options. An entry may contain multiple attributes with same attribute type but different combinations of language tag (and other) options.
语言标记选项将自然语言与属性值相关联。属性描述可以包含多个语言标记选项。一个条目可能包含多个属性,这些属性具有相同的属性类型,但语言标记(和其他)选项的组合不同。
A language tag option conforms to the following ABNF [RFC2234]:
语言标记选项符合以下ABNF[RFC2234]:
language-tag-option = "lang-" Language-Tag
语言标记option=“lang-”语言标记
where the Language-Tag production is as defined in BCP 47 [RFC3066]. This production and those it imports from [RFC2234] are provided here for convenience:
其中,语言标记生成如BCP 47[RFC3066]中所定义。为方便起见,此处提供了该产品及其从[RFC2234]进口的产品:
Language-Tag = Primary-subtag *( "-" Subtag )
语言标记=主子标记*(“-”子标记)
Primary-subtag = 1*8ALPHA
Primary-subtag = 1*8ALPHA
Subtag = 1*8(ALPHA / DIGIT)
Subtag = 1*8(ALPHA / DIGIT)
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
DIGIT = %x30-39 ; 0-9
DIGIT = %x30-39 ; 0-9
A language tag option is a tagging option. A language tag option has no effect on the syntax of the attribute's values nor their transfer encoding.
语言标记选项是标记选项。语言标记选项对属性值的语法及其传输编码没有影响。
Examples of valid AttributeDescription:
有效属性描述的示例:
givenName;lang-en-US CN;lang-ja SN;lang-de;lang-gem-PFL O;lang-i-klingon;x-foobar description;x-foobar CN
吉文纳姆;朗恩美国中国;郎家锡;朗德;朗宝石PFL O;克林贡;x-foobar描述;x-foobar中国
Notes: The last two have no language tag options. The x-foobar option is fictious and used for example purposes.
注意:最后两个没有语言标记选项。x-foobar选项是虚构的,用于示例目的。
If language tag options are present in an AttributeDescription in an assertion, then for each entry within scope, the values of each attribute whose AttributeDescription consists of the same attribute type or its subtypes and contains each of the presented (and possibly other) options is to be matched.
如果语言标记选项存在于断言的AttributeDescription中,则对于范围内的每个条目,其AttributeDescription由相同的属性类型或其子类型组成并包含每个呈现(可能还有其他)选项的每个属性的值都将匹配。
Thus, for example, a filter of an equality match of type "name;lang-en-US" and assertion value "Billy Ray", against the following directory entry:
因此,例如,针对以下目录条目,筛选类型为“name;lang en US”和断言值为“Billy Ray”的相等匹配:
dn: SN=Ray,DC=example,DC=com objectClass: person DOES NOT MATCH (wrong type) objectClass: extensibleObject DOES NOT MATCH (wrong type) name;lang-en-US: Billy Ray MATCHES name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value) CN;lang-en-US: Billy Ray MATCHES
dn: SN=Ray,DC=example,DC=com objectClass: person DOES NOT MATCH (wrong type) objectClass: extensibleObject DOES NOT MATCH (wrong type) name;lang-en-US: Billy Ray MATCHES name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value) CN;lang-en-US: Billy Ray MATCHES
CN;lang-en-US;x-foobar: Billy Ray MATCHES CN;lang-en;x-foobar: Billy Ray DOES NOT MATCH (differing lang-) CN;x-foobar: Billy Ray DOES NOT MATCH (no lang-) name: Billy Ray DOES NOT MATCH (no lang-) SN;lang-en-GB;lang-en-US: Billy Ray MATCHES SN: Ray DOES NOT MATCH (no lang-, wrong value)
CN;lang-en-US;x-foobar: Billy Ray MATCHES CN;lang-en;x-foobar: Billy Ray DOES NOT MATCH (differing lang-) CN;x-foobar: Billy Ray DOES NOT MATCH (no lang-) name: Billy Ray DOES NOT MATCH (no lang-) SN;lang-en-GB;lang-en-US: Billy Ray MATCHES SN: Ray DOES NOT MATCH (no lang-, wrong value)
Note that "CN" and "SN" are subtypes of "name".
请注意,“CN”和“SN”是“名称”的子类型。
It is noted that providing a language tag option in a search filter AttributeDescription will filter out desirable values where the tag does not match exactly. For example, the filter (name;lang-en=Billy Ray) does NOT match the attribute "name;lang-en-US: Billy Ray".
请注意,在搜索筛选器AttributeDescription中提供语言标记选项将过滤掉标记不完全匹配的所需值。例如,过滤器(name;lang en=Billy Ray)与属性“name;lang en US:Billy Ray”不匹配。
If the server does not support storing attributes with language tag options in the DIT, then any assertion which includes a language tag option will not match as such it is an unrecognized attribute type. No error would be returned because of this; a presence assertion would evaluate to FALSE and all other assertions to Undefined.
如果服务器不支持在DIT中存储带有语言标记选项的属性,则包含语言标记选项的任何断言都将不匹配,因为它是无法识别的属性类型。不会因此返回任何错误;状态断言的计算结果为FALSE,所有其他断言的计算结果为Undefined。
If no options are specified in the assertion, then only the base attribute type and the assertion value need match the value in the directory.
如果断言中未指定任何选项,则只有基本属性类型和断言值需要与目录中的值匹配。
Thus, for example, a filter of an equality match of type "name" and assertion value "Billy Ray", against the following directory entry:
因此,例如,针对以下目录条目,筛选类型为“name”和断言值为“Billy Ray”的相等匹配:
dn: SN=Ray,DC=example,DC=com objectClass: person DOES NOT MATCH (wrong type) objectClass: extensibleObject DOES NOT MATCH (wrong type) name;lang-en-US: Billy Ray MATCHES name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value) CN;lang-en-US;x-foobar: Billy Ray MATCHES CN;lang-en;x-foobar: Billy Ray MATCHES CN;x-foobar: Billy Ray MATCHES name: Billy Ray MATCHES SN;lang-en-GB;lang-en-US: Billy Ray MATCHES SN: Ray DOES NOT MATCH (wrong value)
dn: SN=Ray,DC=example,DC=com objectClass: person DOES NOT MATCH (wrong type) objectClass: extensibleObject DOES NOT MATCH (wrong type) name;lang-en-US: Billy Ray MATCHES name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value) CN;lang-en-US;x-foobar: Billy Ray MATCHES CN;lang-en;x-foobar: Billy Ray MATCHES CN;x-foobar: Billy Ray MATCHES name: Billy Ray MATCHES SN;lang-en-GB;lang-en-US: Billy Ray MATCHES SN: Ray DOES NOT MATCH (wrong value)
Clients can provide language tag options in each AttributeDescription in the requested attribute list in a search request.
客户端可以在搜索请求中请求的属性列表中的每个属性描述中提供语言标记选项。
If language tag options are provided in an attribute description, then only attributes in a directory entry whose attribute descriptions have the same attribute type or its subtype and contains
如果属性描述中提供了语言标记选项,则只有属性描述具有相同属性类型或其子类型且包含
each of the presented (and possibly other) language tag options are to be returned. Thus if a client requests just the attribute "name;lang-en", the server would return "name;lang-en" and "CN;lang-en;lang-ja" but not "SN" nor "name;lang-fr".
将返回每个显示的(可能还有其他)语言标记选项。因此,如果客户机只请求属性“name;lang en”,服务器将返回“name;lang en”和“CN;lang en;lang ja”,而不是“SN”或“name;lang fr”。
Clients can provide in the attribute list multiple AttributeDescriptions which have the same base attribute type but different options. For example, a client could provide both "name;lang-en" and "name;lang-fr", and this would permit an attribute with either language tag option to be returned. Note there would be no need to provide both "name" and "name;lang-en" since all subtypes of name would match "name".
客户端可以在属性列表中提供多个AttributeDescription,这些AttributeDescription具有相同的基本属性类型,但具有不同的选项。例如,客户机可以同时提供“name;lang en”和“name;lang fr”,这将允许返回带有任一语言标记选项的属性。注意:不需要同时提供“name”和“name;lang en”,因为name的所有子类型都将匹配“name”。
If a server does not support storing attributes with language tag options in the DIT, then any attribute descriptions in the list which include language tag options are to be ignored, just as if they were unknown attribute types.
如果服务器不支持在DIT中存储带有语言标记选项的属性,则列表中包含语言标记选项的任何属性描述都将被忽略,就像它们是未知的属性类型一样。
If a request is made specifying all attributes or an attribute is requested without providing a language tag option, then all attribute values regardless of their language tag option are returned.
如果发出的请求指定了所有属性,或者请求的属性未提供语言标记选项,则返回所有属性值,而不管其语言标记选项如何。
For example, if the client requests a "description" attribute, and a matching entry contains the following attributes:
例如,如果客户端请求“description”属性,并且匹配条目包含以下属性:
objectClass: top objectClass: organization O: Software GmbH description: software products description;lang-en: software products description;lang-de: Softwareprodukte
objectClass: top objectClass: organization O: Software GmbH description: software products description;lang-en: software products description;lang-de: Softwareprodukte
The server would return:
服务器将返回:
description: software products description;lang-en: software products description;lang-de: Softwareprodukte
description: software products description;lang-en: software products description;lang-de: Softwareprodukte
Language tag options can be present in an AttributeDescription used in a compare request AttributeValueAssertion. This is to be treated by servers the same as the use of language tag options in a search filter with an equality match, as described in Section 2.2. If there is no attribute in the entry with the same attribute type or its subtype and contains each of the presented (or possibly other) language tag options, the noSuchAttributeType error will be returned.
语言标记选项可以出现在比较请求AttributeValueAssertion中使用的AttributeDescription中。服务器对这一点的处理与在具有相等匹配的搜索筛选器中使用语言标记选项的处理相同,如第2.2节所述。如果条目中没有具有相同属性类型或其子类型的属性,并且包含每个显示的(或可能其他)语言标记选项,则将返回noSuchAttributeType错误。
Thus, for example, a compare request of type "name" and assertion value "Johann", against an entry containing the following attributes:
因此,例如,将类型为“name”和断言值为“Johann”的请求与包含以下属性的条目进行比较:
objectClass: top objectClass: person givenName;lang-de-DE: Johann CN: Johann Sibelius SN: Sibelius
objectClass:top objectClass:person-givenName;郎德德:约翰中国:约翰西贝柳斯序号:西贝柳斯
would cause the server to return compareTrue.
将导致服务器返回compareTrue。
However, if the client issued a compare request of type "name;lang-de" and assertion value "Johann" against the above entry, the request would fail with the noSuchAttributeType error.
但是,如果客户机针对上述条目发出类型为“name;lang de”和断言值为“Johann”的比较请求,则请求将失败,并出现noSuchAttributeType错误。
If the server does not support storing attributes with language tag options in the DIT, then any comparison which includes a language tag option will always fail to locate an attribute, and noSuchAttributeType will be returned.
如果服务器不支持在DIT中存储带有语言标记选项的属性,则包含语言标记选项的任何比较都将始终无法找到属性,并且将返回noSuchAttributeType。
Clients can provide language options in AttributeDescription in attributes of a new entry to be created.
客户端可以在要创建的新条目的属性中的属性描述中提供语言选项。
A client can provide multiple attributes with the same attribute type and value, so long as each attribute has a different set of language tag options.
客户机可以提供具有相同属性类型和值的多个属性,只要每个属性具有一组不同的语言标记选项。
For example, the following is a valid request:
例如,以下是有效的请求:
dn: CN=John Smith,DC=example,DC=com objectClass: residentialPerson CN: John Smith CN;lang-en: John Smith SN: Smith SN;lang-en: Smith streetAddress: 1 University Street streetAddress;lang-en-US: 1 University Street streetAddress;lang-fr: 1 rue Universite houseIdentifier;lang-fr: 9e etage
dn: CN=John Smith,DC=example,DC=com objectClass: residentialPerson CN: John Smith CN;lang-en: John Smith SN: Smith SN;lang-en: Smith streetAddress: 1 University Street streetAddress;lang-en-US: 1 University Street streetAddress;lang-fr: 1 rue Universite houseIdentifier;lang-fr: 9e etage
If a server does not support storing language tag options with attribute values in the DIT, then it MUST treat an AttributeDescription with a language tag option as an unrecognized attribute. If the server forbids the addition of unrecognized attributes then it MUST fail the add request with an appropriate result code.
如果服务器不支持在DIT中存储带有属性值的语言标记选项,则必须将带有语言标记选项的AttributeDescription视为无法识别的属性。如果服务器禁止添加无法识别的属性,则必须使用适当的结果代码使添加请求失败。
A client can provide language tag options in an AttributeDescription as part of a modification element in the modify operation.
客户端可以在AttributeDescription中提供语言标记选项,作为修改操作中修改元素的一部分。
Attribute types and language tag options MUST match exactly against values stored in the directory. For example, if the modification is a "delete", then if the stored values to be deleted have language tag options, then those language tag options MUST be provided in the modify operation, and if the stored values to be deleted do not have any language tag option, then no language tag option is to be provided.
属性类型和语言标记选项必须与目录中存储的值完全匹配。例如,如果修改是“删除”,则如果要删除的存储值具有语言标记选项,则必须在修改操作中提供这些语言标记选项,如果要删除的存储值没有任何语言标记选项,则不提供语言标记选项。
If the server does not support storing language tag options with attribute values in the DIT, then it MUST treat an AttributeDescription with a language tag option as an unrecognized attribute, and MUST fail the request with an appropriate result code.
如果服务器不支持在DIT中存储带有属性值的语言标记选项,则必须将带有语言标记选项的AttributeDescription视为无法识别的属性,并且必须使用适当的结果代码使请求失败。
Since the publication of RFC 2596, it has become apparent that there is a need to provide a mechanism for a client to request attributes based upon set of language tag options whose tags all begin with the same sequence of language sub-tags.
自RFC 2596的发布以来,显然需要为客户端提供一种机制,以基于一组语言标记选项请求属性,这些语言标记选项的标记都以相同的语言子标记序列开始。
AttributeDescriptions containing language range options are intended to be used in attribute value assertions, search attribute lists, and other places where the client desires to provide an attribute description matching of a range of language tags associated with attributes.
包含语言范围选项的AttributeDescription用于属性值断言、搜索属性列表以及客户端希望提供与属性关联的一系列语言标记的属性描述匹配的其他位置。
A language range option conforms to the following ABNF [RFC2234]:
语言范围选项符合以下ABNF[RFC2234]:
language-range-option = "lang-" [ Language-Tag "-" ]
语言范围option=“lang-”[语言标记“-”]
where the Language-Tag production is as defined in BCP 47 [RFC3066]. This production and those it imports from [RFC2234] are provided in Section 2.1 for convenience.
其中,语言标记生成如BCP 47[RFC3066]中所定义。为方便起见,第2.1节提供了该产品及其从[RFC2234]进口的产品。
A language range option matches a language tag option if the language range option less the trailing "-" matches exactly the language tag or if the language range option (including the trailing "-") matches a prefix of the language tag option. Note that the language range option "lang-" matches all language tag options.
如果语言范围选项减去尾随“-”与语言标记完全匹配,或者如果语言范围选项(包括尾随“-”)与语言标记选项的前缀匹配,则语言范围选项与语言标记选项匹配。请注意,语言范围选项“lang-”匹配所有语言标记选项。
Examples of valid AttributeDescription containing language range options:
包含语言范围选项的有效AttributeDescription示例:
givenName;lang-en- CN;lang- SN;lang-de-;lang-gem- O;lang-x-;x-foobar
givenName;lang-en- CN;lang- SN;lang-de-;lang-gem- O;lang-x-;x-foobar
A language range option is not a tagging option. Attributes cannot be stored with language range options. Any attempt to add or update an attribute description with a language range option SHALL be treated as an undefined attribute type and result in an error.
语言范围选项不是标记选项。不能使用语言范围选项存储属性。使用语言范围选项添加或更新属性描述的任何尝试应视为未定义的属性类型,并导致错误。
A language range option has no effect on the transfer encoding nor on the syntax of the attribute values.
语言范围选项对传输编码和属性值的语法没有影响。
Servers SHOULD support assertion of language ranges for any attribute type which they allow to be stored with language tags.
服务器应支持断言任何属性类型的语言范围,这些属性类型允许使用语言标记存储。
If a language range option is present in an AttributeDescription in an assertion, then for each entry within scope, the values of each attribute whose AttributeDescription consists of the same attribute type or its subtypes and contains a language tag option matching the language range option are to be returned.
如果断言中的AttributeDescription中存在语言范围选项,则对于范围内的每个条目,将返回其AttributeDescription包含相同属性类型或其子类型且包含与语言范围选项匹配的语言标记选项的每个属性的值。
Thus, for example, a filter of an equality match of type "name;lang-en-" and assertion value "Billy Ray", against the following directory entry:
因此,例如,针对以下目录条目,筛选类型为“name;lang en-”和断言值“Billy Ray”的相等匹配:
dn: SN=Ray,DC=example,DC=com objectClass: person DOES NOT MATCH (wrong type) objectClass: extensibleObject DOES NOT MATCH (wrong type) name;lang-en-US: Billy Ray MATCHES name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value) CN;lang-en-US: Billy Ray MATCHES CN;lang-en-US;x-foobar: Billy Ray MATCHES CN;lang-en;x-foobar: Billy Ray MATCHES CN;x-foobar: Billy Ray DOES NOT MATCH (no lang-) name: Billy Ray DOES NOT MATCH (no lang-) SN;lang-en-GB;lang-en-US: Billy Ray MATCHES SN: Ray DOES NOT MATCH (no lang-, wrong value)
dn: SN=Ray,DC=example,DC=com objectClass: person DOES NOT MATCH (wrong type) objectClass: extensibleObject DOES NOT MATCH (wrong type) name;lang-en-US: Billy Ray MATCHES name;lang-en-US: Billy Bob DOES NOT MATCH (wrong value) CN;lang-en-US: Billy Ray MATCHES CN;lang-en-US;x-foobar: Billy Ray MATCHES CN;lang-en;x-foobar: Billy Ray MATCHES CN;x-foobar: Billy Ray DOES NOT MATCH (no lang-) name: Billy Ray DOES NOT MATCH (no lang-) SN;lang-en-GB;lang-en-US: Billy Ray MATCHES SN: Ray DOES NOT MATCH (no lang-, wrong value)
Note that "CN" and "SN" are subtypes of "name".
请注意,“CN”和“SN”是“名称”的子类型。
If the server does not support storing attributes with language tag options in the DIT, then any assertion which includes a language range option will not match as it is an unrecognized attribute type. No error would be returned because of this; a presence filter would evaluate to FALSE and all other assertions to Undefined.
如果服务器不支持在DIT中存储带有语言标记选项的属性,则包含语言范围选项的任何断言都将不匹配,因为它是无法识别的属性类型。不会因此返回任何错误;状态筛选器的计算结果为FALSE,所有其他断言的计算结果为Undefined。
Clients can provide language range options in each AttributeDescription in the requested attribute list in a search request.
客户端可以在搜索请求中请求的属性列表中的每个属性描述中提供语言范围选项。
If a language range option is provided in an attribute description, then only attributes in a directory entry whose attribute descriptions have the same attribute type or its subtype and a language tag option matching the provided language range option are to be returned. Thus if a client requests just the attribute "name;lang-en-", the server would return "name;lang-en-US" and "CN;lang-en;lang-ja" but not "SN" nor "name;lang-fr".
如果属性描述中提供了语言范围选项,则仅返回属性描述具有相同属性类型或其子类型的目录条目中的属性,以及与提供的语言范围选项匹配的语言标记选项。因此,如果客户机只请求属性“name;lang en-”,服务器将返回“name;lang en US”和“CN;lang en;lang ja”,而不是“SN”或“name;lang fr”。
Clients can provide in the attribute list multiple AttributeDescriptions which have the same base attribute type but different options. For example a client could provide both "name;lang-en-" and "name;lang-fr-", and this would permit an attribute whose type was name or subtype of name and with a language tag option matching either language range option to be returned.
客户端可以在属性列表中提供多个AttributeDescription,这些AttributeDescription具有相同的基本属性类型,但具有不同的选项。例如,客户机可以同时提供“name;lang en-”和“name;lang fr-”,这将允许返回类型为name或name的子类型且带有与任一语言范围选项匹配的语言标记选项的属性。
If a server does not support storing attributes with language tag options in the DIT, then any attribute descriptions in the list which include language range options are to be ignored, just as if they were unknown attribute types.
如果服务器不支持在DIT中存储带有语言标记选项的属性,则列表中包含语言范围选项的任何属性描述都将被忽略,就像它们是未知的属性类型一样。
Language range options can be present in an AttributeDescription used in a compare request AttributeValueAssertion. This is to be treated by servers the same as the use of language range options in a search filter with an equality match, as described in Section 3.1. If there is no attribute in the entry with the same subtype and a matching language tag option, the noSuchAttributeType error will be returned.
语言范围选项可以出现在比较请求AttributeValueAssertion中使用的AttributeDescription中。服务器对这一点的处理与在具有相等匹配的搜索筛选器中使用语言范围选项的处理相同,如第3.1节所述。如果条目中没有具有相同子类型和匹配语言标记选项的属性,则将返回noSuchAttributeType错误。
Thus, for example, a compare request of type "name;lang-" and assertion value "Johann", against the entry with the following attributes:
因此,例如,将类型为“name;lang-”和断言值为“Johann”的请求与具有以下属性的条目进行比较:
objectClass: top objectClass: person givenName;lang-de-DE: Johann CN: Johann Sibelius SN: Sibelius
objectClass:top objectClass:person-givenName;郎德德:约翰中国:约翰西贝柳斯序号:西贝柳斯
will cause the server to return compareTrue. (Note that the language range option "lang-" matches any language tag option.)
将导致服务器返回compareTrue。(请注意,语言范围选项“lang-”与任何语言标记选项匹配。)
However, if the client issued a compare request of type "name;lang-de" and assertion value "Sibelius" against the above entry, the request would fail with the noSuchAttributeType error.
但是,如果客户机针对上述条目发出类型为“name;lang de”和断言值为“Sibelius”的比较请求,则请求将失败,并出现noSuchAttributeType错误。
If the server does not support storing attributes with language tag options in the DIT, then any comparison which includes a language range option will always fail to locate an attribute, and noSuchAttributeType will be returned.
如果服务器不支持在DIT中存储带有语言标记选项的属性,则包含语言范围选项的任何比较都将始终无法找到属性,并且将返回noSuchAttributeType。
A server SHOULD indicate that it supports storing attributes with language tag options in the DIT by publishing 1.3.6.1.4.1.4203.1.5.4 as a value of the root DSE.
服务器应通过将1.3.6.1.4.1.4203.1.5.4发布为根DSE的值,表明其支持在DIT中存储带有语言标记选项的属性。
A server SHOULD indicate that it supports language range matching of attributes with language tag options stored in the DIT by publishing 1.3.6.1.4.1.4203.1.5.5 as a value of the "supportedFeatures" [RFC3674] attribute in the root DSE.
通过将1.3.6.1.4.1.4203.1.5.5发布为根DSE中“supportedFeatures”[RFC3674]属性的值,服务器应表明其支持属性与DIT中存储的语言标记选项的语言范围匹配。
A server MAY restrict use of language tag options to a subset of the attribute types it recognizes. This document does not define a mechanism for determining which subset of attribute types can be used with language tag options.
服务器可能会将语言标记选项的使用限制为其识别的属性类型的子集。本文档未定义用于确定哪些属性类型子集可与语言标记选项一起使用的机制。
Implementators of this specification should take care that their use of language tag options does not impede proper function of implementations which do not support language tags.
本规范的实现者应注意,他们对语言标记选项的使用不会妨碍不支持语言标记的实现的正常功能。
Per RFC 2251, "an AttributeDescription with one or more options is treated as a subtype of the attribute type without any options." A non-supporting server will treat an AttributeDescription with any language tag options as an unrecognized attribute type. A non-supporting client will either do the same, or will treat the AttributeDescription as it would any other unknown subtype. Typically, non-supporting clients simply ignore unrecognized subtypes (and unrecognized attribute types) of attributes they request.
根据RFC 2251,“带有一个或多个选项的AttributeDescription被视为不带任何选项的属性类型的子类型。”非支持服务器将带有任何语言标记选项的AttributeDescription视为无法识别的属性类型。不支持的客户端将执行相同的操作,或者将AttributeDescription视为任何其他未知子类型。通常,不支持的客户端只会忽略它们请求的属性的未识别的子类型(和未识别的属性类型)。
To ensure proper function of non-supporting clients, supporting clients SHOULD ensure that entries they populate with tagged values are also populated with non-tagged values.
为确保非支持客户机的正常功能,支持客户机应确保其填充有标记值的条目也填充有非标记值。
Additionally, supporting clients SHOULD be prepared to handle entries which are not populated with tagged values.
此外,支持客户端应准备好处理未填充标记值的条目。
Language tags and range options are used solely to indicate the native language of values and in querying the directory for values which fulfill the user's language needed. These options are not known to raise specific security considerations. However, the reader should consider general directory security issues detailed in the LDAP technical specification [RFC3377].
语言标记和范围选项仅用于指示值的本机语言,以及查询目录中满足用户所需语言的值。我们不知道这些选项会引起特定的安全考虑。然而,读者应该考虑LDAP技术规范中详细描述的一般目录安全问题[RFC317]。
Registration of these protocol mechanisms [RFC3383] has been completed by the IANA.
IANA已完成这些协议机制的注册[RFC3383]。
Subject: Request for LDAP Protocol Mechanism Registration Object Identifier: 1.3.6.1.4.1.4203.1.5.4 Description: Language Tag Options Object Identifier: 1.3.6.1.4.1.4203.1.5.5 Description: Language Range Options Person & email address to contact for further information: Kurt Zeilenga <kurt@openldap.org> Usage: Feature Specification: RFC 3866 Author/Change Controller: IESG Comments: none
Subject: Request for LDAP Protocol Mechanism Registration Object Identifier: 1.3.6.1.4.1.4203.1.5.4 Description: Language Tag Options Object Identifier: 1.3.6.1.4.1.4203.1.5.5 Description: Language Range Options Person & email address to contact for further information: Kurt Zeilenga <kurt@openldap.org> Usage: Feature Specification: RFC 3866 Author/Change Controller: IESG Comments: none
These OIDs were assigned [ASSIGN] by OpenLDAP Foundation, under its IANA-assigned private enterprise allocation [PRIVATE], for use in this specification.
这些OID由OpenLDAP基金会指派(赋值),在其IANA分配的私有企业分配(私有)下,用于本规范中。
This document is a revision of RFC 2596 by Mark Wahl and Tim Howes. RFC 2596 was a product of the IETF ASID and LDAPEXT working groups. This document also borrows from a number of IETF documents including BCP 47 by H. Alvestrand.
本文件是Mark Wahl和Tim Howes对RFC 2596的修订版。RFC2596是IETF ASID和LDAPEXT工作组的产品。本文件还借鉴了许多IETF文件,包括H.Alvestrand的BCP 47。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC2234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
[RFC2234]Crocker,D.,Ed.和P.Overell,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。
[RFC2251] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, December 1997.
[RFC2251]Wahl,M.,Howes,T.和S.Kille,“轻量级目录访问协议(v3)”,RFC 2251,1997年12月。
[RFC3066] Alvestrand, H., "Tags for the Identification of Languages", BCP 47, RFC 3066, January 2001.
[RFC3066]Alvestrand,H.,“语言识别标签”,BCP 47,RFC 3066,2001年1月。
[RFC3377] Hodges, J. and R. Morgan, "Lightweight Directory Access Protocol (v3): Technical Specification", RFC 3377, September 2002.
[RFC3377]Hodges,J.和R.Morgan,“轻量级目录访问协议(v3):技术规范”,RFC 3377,2002年9月。
[RFC3674] Zeilenga, K., "Feature Discovery in Lightweight Directory Access Protocol (LDAP)", RFC 3674, December 2003.
[RFC3674]Zeilenga,K.,“轻量级目录访问协议(LDAP)中的功能发现”,RFC 3674,2003年12月。
[ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986.
[ASCII]编码字符集——信息交换用7位美国标准代码,ANSI X3.4-1986。
[X.501] International Telecommunication Union - Telecommunication Standardization Sector, "The Directory -- Models," X.501(1997).
[X.501]国际电信联盟-电信标准化部门,“目录——模型”,X.501(1997)。
[RFC3383] Zeilenga, K., "Internet Assigned Numbers Authority (IANA) Considerations for Lightweight Directory Access Protocol (LDAP)", BCP 64, RFC 3383, September 2002.
[RFC3383]Zeilenga,K.,“轻量级目录访问协议(LDAP)的互联网分配号码管理局(IANA)注意事项”,BCP 64,RFC 3383,2002年9月。
[ASSIGN] OpenLDAP Foundation, "OpenLDAP OID Delegations", http://www.openldap.org/foundation/oid-delegate.txt.
[分配] OpenLDAP基金会,“OpenLDAP类委托”,http://www.openldap.org/foundation/oid-delegate.txt.
[PRIVATE] IANA, "Private Enterprise Numbers", http://www.iana.org/assignments/enterprise-numbers.
[私人]IANA,“私人企业编号”,http://www.iana.org/assignments/enterprise-numbers.
This document adds support for language ranges, provides a mechanism that a client can use to discover whether a server supports language tags and ranges, and clarifies how attributes with multiple language tags are to be treated. This document is a significant rewrite of RFC 2596.
本文档添加了对语言范围的支持,提供了一种机制,客户端可以使用该机制来发现服务器是否支持语言标记和范围,并阐明了如何处理具有多个语言标记的属性。本文件是对RFC2596的重要重写。
Appendix B. Differences from X.500(1997)
附录B.与X.500(1997年)的差异
X.500(1997) [X.501] defines a different mechanism, contexts, as the means of representing language tags (codes). This section summarizes the major differences in approach.
X.500(1997)[X.501]定义了一种不同的机制,即上下文,作为表示语言标记(代码)的手段。本节总结了方法上的主要差异。
a) An X.500 operation which has specified a language code on a value matches a value in the directory without a language code.
a) 在值上指定语言代码的X.500操作与目录中没有语言代码的值匹配。
b) LDAP references BCP 47 [RFC3066], which allows for IANA registration of new tags as well as unregistered tags.
b) LDAP引用了BCP 47[RFC3066],它允许IANA注册新的标记以及未注册的标记。
c) LDAP supports language ranges (new in this revision).
c) LDAP支持语言范围(本修订版中新增)。
d) LDAP does not allow language tags (and ranges) in distinguished names.
d) LDAP不允许在可分辨名称中使用语言标记(和范围)。
e) X.500 describes subschema administration procedures to allow language codes to be associated with particular attributes types.
e) X.500描述了允许语言代码与特定属性类型关联的子模式管理程序。
Editor's Address
编辑地址
Kurt D. Zeilenga OpenLDAP Foundation
库尔特D.Zeeliga OpenLDAP基金会
EMail: Kurt@OpenLDAP.org
EMail: Kurt@OpenLDAP.org
Full Copyright Statement
完整版权声明
Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
版权所有(C)互联网协会(2004年)。本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
本文件及其包含的信息是按“原样”提供的,贡献者、他/她所代表或赞助的组织(如有)、互联网协会和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。
Intellectual Property
知识产权
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.
Acknowledgement
确认
Funding for the RFC Editor function is currently provided by the Internet Society.
RFC编辑功能的资金目前由互联网协会提供。