大网数据广告活动
域与目录服务

Naming Attributes and Classes

· 52CE 我爱测

This topic includes guidelines for naming attributes and classes.

This topic includes guidelines for naming attributes and classes.

To create a new class or attribute, adhere to the following naming rules:

  • Use the same name for both the cn and lDAPDisplayName properties of a new attributeSchema or classSchema object.
  • Identify the company with a lower-case prefix in the first section of the name. This prefix can be a DNS name, acronym, or other string that uniquely identifies the company. The prefix ensures that all attributes and classes for a specific company are displayed consecutively when browsing the schema.
  • If you are developing a schema extension as an independent software vendor, add an abbreviation of the product name of the prefix. This adds distinction between multiple products that contain LDAP schema extensions.
  • Use a hyphen as the next character after the prefix.
  • Specify an attribute or class name that is unique within the company's attributes after the hyphen. This part of the common-name should be descriptive. Do not use illogical names that are meaningless to developers and viewers of the schema.

For example, if the fictitious Fabrikam company extended the schema by adding an attribute for storing a voice-mail identifier, the cn and lDAPDisplayName of the new attribute could be "fabrikam-VoiceMailID".

If the lDAPDisplayName of an attribute or class is not specified, the system uses the cn to generate one. However, the system algorithm for generating the name may result in name collisions or names that are difficult to read. To avoid these problems, it is recommended that an lDAPDisplayName be explicitly specified for all attributes and classes.

For development and testing purposes, it may be desirable to append a version suffix to the cn and lDAPDisplayName, for example, "fabrikam-VoiceMailID-001". In a distributed development/test environment, a version suffix enables developers to run multiple versions of their software simultaneously. After testing is complete, rename the attribute or class to remove the suffix.

It is not possible to delete defunct versions of a schema extensions, but it is possible to disable them and rename them with obscure names. For more information, see Disabling Existing Classes and Attributes.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。