CustomXMLSchemaCollection.AddCollection Method (Office)
Adds an existing schema collection to the current schema collection.
Syntax
expression .AddCollection(SchemaCollection)
expression An expression that returns a CustomXMLSchemaCollection object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
SchemaCollection |
Required |
CustomXMLSchemaCollection |
Represents a collection of schemas to be imported into the current schema collection. |
Remarks
If there is a conflict between namespaces while importing the collection, for example if x.xsd is already linked to "urn:invoice:namespace" but the incoming collection has z.xsd for the same namespace, the incoming collection wins.
Example
The following example receives the target schema collection and incoming schema collection arguments and then adds the one collection to the other.
Sub AddSchema(objTargetCustomXMLSchemaCollection As CustomXMLSchemaCollection, _
objTargetCustomXMLSchemaCollection As CustomXMLSchemaCollection)
' Adds a schema collection to another schema the collection.
objTargetCustomXMLSchemaCollection.AddCollection(objIncomingCustomXMLSchemaCollection)
End Sub