StaticContextSettings.ImportSchema Method (XmlSchema)StaticContextSettings.ImportSchema Method (XmlSchema)StaticContextSettings::ImportSchema Method (XmlSchema^)
Adds a schema to the set of available schemas, and imports its namespace.
Syntax
Public Sub ImportSchema( _ schema As System.Xml.Schema.XmlSchema _ )
public void ImportSchema( System.Xml.Schema.XmlSchema schema )
public: void ImportSchema( System.Xml.Schema::XmlSchema^ schema )
Parameters
- schema
Type: System.Xml.Schema.XmlSchemaSystem.Xml.Schema.XmlSchemaSystem.Xml.Schema::XmlSchema^
The schema to import.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | schema is null
a null reference (Nothing in Visual Basic)
nullptr . |
ArgumentExceptionArgumentExceptionArgumentException | The TargetNamespaceTargetNamespaceTargetNamespace property on schema is null
a null reference (Nothing in Visual Basic)
nullptr . |
Remarks
The schema specified is added to SchemasSchemasSchemas, and the namespace of the schema is implicitly imported in all modules of the XQuery Program, XPath Expression or XSL Transformation.
If the namespace of the schema is explicitly imported (via an import module
statement) then the
declaration in the query is ignored, and only the schemas added to the static context settings will be used.