Edytuj

Udostępnij za pośrednictwem


_CustomXMLSchemaCollection.Add(String, String, String, Boolean) Method

Definition

Allows you to add one or more schemas to a schema collection that can then be added to a stream in the data store and to the Schema Library.

public Microsoft.Office.Core.CustomXMLSchema Add (string NamespaceURI = "", string Alias = "", string FileName = "", bool InstallForAllUsers = false);
abstract member Add : string * string * string * bool -> Microsoft.Office.Core.CustomXMLSchema
Public Function Add (Optional NamespaceURI As String = "", Optional Alias As String = "", Optional FileName As String = "", Optional InstallForAllUsers As Boolean = false) As CustomXMLSchema

Parameters

NamespaceURI
String

Optional String. Contains the namespace of the schema to be added to the collection. If the schema already exists in the Schema Library, the method will retrieve it from there.

Alias
String

Optional String. Contains the alias of the schema to be added to the collection. If the alias already exists in the Schema Library, the method can find it using this argument.

FileName
String

Optional String. Contains the location of the schema on a disk. If this parameter is specified, the schema is added to the collection and to the Schema Library.

InstallForAllUsers
Boolean

Optional Boolean. Specifies whether, in the case where the method is adding the schema to the Schema Library, the Schema Library keys should be written to the registry(HKey_Local_Machine for all users or HKey_Current_User for just the current user). The parameter defaults to False and writes to HKey_Current_User.

Returns

CustomXMLSchema

Remarks

Note: References to DTDs from custom XML parts are not supported. DTD references in custom XML parts will not resolve, and custom XML parts containing DTD references generate an exception when an attempt is made to save the file's content to a flat XML file.

Applies to