Previous | Next | Trail Map | The Basics | Directory Operations

Attribute Names

Attribute names are string names. They are used when you want to specify a particular attribute either for retrieval, searches or modification. They are also returned by operations that return attributes (such as when you perform reads or searches in the directory).

When using attribute names, you need to be aware of certain directory server features so that you won't be surprised by the result.

Attribute Subclassing

Some directory implementations support attribute subclassing in which the server allows attribute types to be defined in terms of other attribute types. For example, a "name" attribute might be the superclass of all name-related attributes: "commonName" might be a subclass of "name". For directory implementations that support this, asking for the "name" attribute might return the "commonName" attribute.

When accessing directories that support attribute subclassing, you have to be aware that the server might be returning attributes with names different from those you have asked for. To minimize the chance of this, use the most derived subclass.

Attribute Name Synonyms

Some directory implementations support synonyms for attribute names. For example, "cn" might be a synonym for "commonName". Asking for the "cn" attribute might return the "commonName" attribute.

When accessing directories that support synonyms for attribute names, you have to be aware that the server might be returning attributes with names different from those you have asked for. To help prevent this from happening, use the "canonical" attribute name instead of one of its synonyms.

Language Preferences

The LDAP V3 has a draft proposal (draft-ietf-ldapext-lang-01.txt) that allows you to specify a language code along with an attribute name, similar to attribute subclassing. For example, you can have a "description" attribute with two language variations:
description: software
description;lang-en: software products
description;lang-de: softwareproduckte
Asking for the "description" attribute would then return all three attributes. When accessing directories that support this features, you have to be aware that the server might be returning attributes with names different from those you have asked for.


Previous | Next | Trail Map | The Basics | Directory Operations