Namespace Guidelines
[This is preliminary documentation and subject to change.]
When creating a name for a custom property, you should use a namespace 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.
- Use the URL or URN URI schemes for 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-microsoft-com:
http://schemas.microsoft.com/myschema/
- 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 a SELECT * statement is executed on a folder containing resources that use custom properties. For more information, see Web Store Schema.
- If your company or organization does not have a registered domain name, attempt to generate a namespace that will render your property names as unique as possible. One way to guarantee this is to use a GUID you generate on one of your computers in the namespace:
urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/
This mechanism, although guaranteed to render the namespace unique, is not simple to read, and may be difficult to present to users in 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 slash mark (/) 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 Web Store OLE DB Provider returns an error indicating that the property is not defined. You could always verify the name of the property by requesting all properties through a WebDAV PROPFIND command or by binding the item directly by using ADO or OLE DB.