StaticContextSettings.ImportSchema Method (string)StaticContextSettings.ImportSchema Method (String)StaticContextSettings::ImportSchema Method (String^)

Imports the schema with the specified target namespace.

Syntax

Public Sub ImportSchema( _
    targetNamespace As String _
)
public void ImportSchema(
    string targetNamespace
)
public:
void ImportSchema(
    String^ targetNamespace
)
 

Parameters

targetNamespace

Type: System.StringSystem.StringSystem::String^

The target namespace to import.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptiontargetNamespace is null a null reference (Nothing in Visual Basic) nullptr

Remarks

The schema with the specified namespace is implicitly imported in all modules of the XQuery program, XPath Expression or XSL Transformation. This is equivalent to adding an import schema declaration to every module.

This method overrides any location hints specified in import schema statements in the query body, and if no modules in this namespace are added to SchemasSchemasSchemas then an XdmExceptionXdmExceptionXdmException will be raised when the query is compiled.