Schema Scope
Topic Last Modified: 2006-06-12
Each folder in the Exchange store has a schema scope. The schema scope is a set of folders, traversed in a particular order, which can contain schema definition items. Each folder can have a different schema scope. The scope can be simple, consisting of only the global schema folder, or complex, containing a large list of folder URLs.
The following two properties from the urn:schemas-microsoft-com:exch-data: Namespace are examined on folder items to define a schema scope:
- schema-collection-ref Field
This property is a URL for a folder in which to search for content class and property definitions. This is the first folder searched for schema definition items and is always the first folder in a folder's schema scope. If this property is not set, the default is that store's non_ipm_subtree/Schema folder, which contains the Exchange store default schema definition items.
To access the global schema of an application or a public store, use The ##SCHEMAURI## Macro. - baseschema Field
This property is a multivalued string containing URLs for one or more other folders. You extend the schema scope for a folder by identifying other folders that contain schema definition items.
Applying these two properties to folders, you create a virtual tree of folders in a store that contains schema definition items, starting with the folder identified by schema-collection-ref. When a schema-aware application constructs the schema information for a particular folder, it traverses the entire scope, breadth first, collecting definition items as they are encountered. The following illustration presents one possible schema scope for a folder.
In the preceding diagram:
- An application folder (not shown in the diagram) identifies folder A as its schema collection folder in its schema-collection-ref property.
- Folder A is the first folder searched for schema definition items.
- Folder A has baseschema URLs pointing to folders B and C, which are subsequently searched (in that order) for schema definition items.
- Folder B has baseschema URLs pointing to folders D and E, which are subsequently searched (in that order) for schema definition items.
- Folder C has a baseschema URL pointing to folder F, which is the last folder in the scope and the last one searched. Typically, this folder is set to the non_ipm_subtree/Schema folder for that store.
Note
The scope tree descends in breadth-first fashion. A breadth-first search works as follows: A is searched first, followed by B and C, and then D, E, and F. This algorithm is not of the recursive-descent type (that is, A, B, D, E, C, F).
Also notice that the scope tree need not, and normally does not, correlate to the actual folder hierarchy in the Exchange store. This scope tree is virtual in that sense.
In most cases, you should have one folder in your application folder schema scope that has a baseschema property with one entry pointing to the non_ipm_subtree/Schema folder in that store. This folder contains the default global schema provided by the Exchange store. If your scope does not contain the non_ipm_subtree/Schema folder, the global schema definition items are not included in your application folder's schema definition.