Share via


Namespace Guidelines

Topic Last Modified: 2006-06-12

When creating a name for a custom property, you should use a namespace Uniform Resource Identifier (URI) to provide scope and uniqueness for the name. The following guidelines are recommended:

  • If your company or organization has registered a domain name with InterNIC, use this name when constructing a namespace for your custom properties.

  • Make sure to use a valid URI scheme for your namespaces. This guarantees that no problems are encountered when transmitting these custom properties through the WebDAV protocol.

  • Avoid using a namespace scheme that denotes standard properties, such as urn:content-classes:, urn:schemas:, and so on. Make sure you incorporate your domain name in the namespace. For example:

    urn:schemas-domain-tld:
    http://schemas.domain.tld/myschema/
    

    where tld denotes the top-level domain.

  • Define custom properties as part of an application schema. This provides a mechanism for discoverability as well as the ability to return custom properties when The SELECT * Statement is executed on a folder containing resources that use custom properties. For more information, see Schema.

  • If your company or organization does not have a registered domain name, try to generate a namespace that will render your property names as unique as possible. One way to guarantee this is to use a globally unique identifier (GUID) you generate on one of your computers in the namespace, as in the following:

    urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/
    

    This mechanism, although guaranteed to render the namespace unique, is not simple to read, and it may be difficult to present to users in Microsoft® Outlook® or Web forms.

  • Make sure you understand how fully qualified names are constructed when setting custom properties using the WebDAV protocol. For example, when constructing the XML code to set custom properties, omitting either the colon (:) or the forward slash (/) at the end of the XML  namespace reference causes the number sign (#) to be used as a separator. If you later request the property by concatenating the property to the namespace with the appropriate separator character, the Exchange OLE DB (ExOLEDB) provider returns an error indicating that the property is not defined. Note that you can always verify the name of a property by requesting all properties through a WebDAV PROPFIND Method or by binding the associated item directly by using Microsoft ActiveX® Data Objects (ADO) or OLE DB.