Platform SDK: Exchange 2000 Server

Configuring Schema Scope

[This is preliminary documentation and subject to change.]

You control a folder's schema scope using two properties: urn:schemas-microsoft-com:exch-data:schema-collection-ref and urn:schemas-microsoft-com:exch-data:baseschema. The former is a property you set on a folder to specify the first folder in which you have content class and property definitions. The latter property is set on any folder that contains schema definition items to indicate where next to look for definition items. The schema-collection-ref property is single-values, meaning that the schema scope for a folder always starts in a single folder; baseschema is a multi-valued string, and you can specify multiple folders to subsequently search for definition items. The order is important as well: folders are searched in the order that the folder URLs appear in the property.

The following example demonstrates how to configure the schema scope for a folder.

[VBScript]
' Update the application folder to specify the schema scope
'  by specifying the folder where applications should begin
'  searching for schema definition items.

Const adModeReadWrite   = 3
Const adFailIfNotExists = -1

Dim strURL
strURL = "file://./backofficestorage/microsoft.com/vroot/myappfolders/"

Dim Rec
Set Rec = CreateObject("ADODB.Record")

' Open my application folder.
Rec.Open strURL & "myappfolder/",,adModeReadWrite, adFailIfNotExists

Dim Flds
Set Flds = Rec.Fields

' Specify the folder in which to start looking for schema.
' Use my application schema folder here. This is
' the folder in which my schema (content class and property) definitions
' are located. This is a property for my application folder.
Flds("urn:schemas-microsoft-com:exch-data:schema-collection-ref") = _
     strURL & "myapp/schema/"

Flds.Update
Rec.Close


' Now set the baseschema property for my application _schema_ folder to
' point to the next folder(s) in which to search for schema definitions
' In this case, point to the default, non_ipm_subtree/schema folder
' for the web store public folder tree.
Rec.Open strURL & "myappfolder/schema/",,adModeReadWrite, adFailIfNotExists

Dim Flds
Set Flds = Rec.Fields
Flds("urn:schemas-microsoft-com:exch-data:baseschema") = _
  Array("file://backofficestorage/microsoft.com/vroot/non_ipm_subtree/schema/")     

Flds.Update
Rec.Close


See Also

urn:schemas-microsoft-com:exch-data:baseschema

urn:schemas-microsoft-com:exch-data:schema-collection-ref

Web Store Schema