In This Article

IXmlSchemaResolver Interface

Provides the base requirements for a class that can manage XML schema data.

public interface IXmlSchemaResolver

Remarks

Instances of this object can be registered with an ISyntaxLanguage using the RegisterService(object, object) method. Once an instance is registered with the language for the IXmlSchemaResolver interface type, its features can be used by the language.

Properties

DefaultNamespace

Gets or sets the default XML namespace to use.

string DefaultNamespace { get; set; }

Property Value

string:

The default XML namespace to use.

Remarks

The default namespace is used to mimic an xmlns attribute setting on the root element, if no xmlns attribute is present. It sets an empty-string-keyed value into the DefaultNamespacePrefixMappings dictionary.

See Also

DefaultNamespacePrefixMappings

Gets the mapping dictionary of namespace prefix to namespaces that are declared by default without the need for xmlns attributes in elements.

IDictionary<string, string> DefaultNamespacePrefixMappings { get; }

Property Value

IDictionary<string, string>:

The mapping dictionary of namespace prefix to namespaces that are declared by default without the need for xmlns attributes in elements.

Remarks

The dictionary keys are namespace prefixes and the values are namespaces. The namespace declarations in this dictionary are used to mimic xmlns attribute settings on the root element when no xmlns declaration attributes for the specified namespace prefix keys are present.

The DefaultNamespace property is simply a wrapper for setting an empty-string-keyed value in this dictionary.

See Also

SchemaSet

Gets or sets the System.Xml.Schema.XmlSchemaSet to use.

XmlSchemaSet SchemaSet { get; set; }

Property Value

XmlSchemaSet:

The System.Xml.Schema.XmlSchemaSet to use.

Remarks

This property can be set if you already have a XmlSchemaSet loaded that should directly be used.

See Also

Methods

GetChildSchemaElement(XmlSchemaElement, XmlQualifiedName)

Returns the child System.Xml.Schema.XmlSchemaElement that has the specified qualified name.

XmlSchemaElement GetChildSchemaElement(XmlSchemaElement parentElement, XmlQualifiedName name)
Parameter Type Description
parentElement XmlSchemaElement

The parent System.Xml.Schema.XmlSchemaElement.

name XmlQualifiedName

The System.Xml.XmlQualifiedName for which to search.

Returns

XmlSchemaElement:

The child System.Xml.Schema.XmlSchemaElement that has the specified qualified name.

See Also

GetChildSchemaElements(XmlSchemaElement)

Returns the child System.Xml.Schema.XmlSchemaElement objects.

IEnumerable<XmlSchemaElement> GetChildSchemaElements(XmlSchemaElement parentElement)
Parameter Type Description
parentElement XmlSchemaElement

The parent System.Xml.Schema.XmlSchemaElement.

Returns

IEnumerable<XmlSchemaElement>:

The child System.Xml.Schema.XmlSchemaElement objects.

See Also

GetDocumentation(XmlSchemaAnnotated)

Returns the XSD documentation for the specified source object.

string GetDocumentation(XmlSchemaAnnotated source)
Parameter Type Description
source XmlSchemaAnnotated

The source System.Xml.Schema.XmlSchemaAnnotated for which the documentation is being retrieved.

Returns

string:

The documentation that was retrieved.

Remarks

The default implementation of this method appends the inner text of all the System.Xml.Schema.XmlSchemaDocumentation child nodes together, with whitespace in between.

See Also

GetGlobalSchemaElement(XmlQualifiedName)

Returns the global System.Xml.Schema.XmlSchemaElement that has the specified qualified name.

XmlSchemaElement GetGlobalSchemaElement(XmlQualifiedName name)
Parameter Type Description
name XmlQualifiedName

The System.Xml.XmlQualifiedName for which to search.

Returns

XmlSchemaElement:

The global System.Xml.Schema.XmlSchemaElement that has the specified qualified name.

See Also

GetGlobalSchemaElements()

Returns the collection of global System.Xml.Schema.XmlSchemaElement objects.

IEnumerable<XmlSchemaElement> GetGlobalSchemaElements()

Returns

IEnumerable<XmlSchemaElement>:

The collection of global System.Xml.Schema.XmlSchemaElement objects.

See Also

GetSchemaAttributes(XmlSchemaElement)

Returns the child System.Xml.Schema.XmlSchemaAttribute objects.

IEnumerable<XmlSchemaAttribute> GetSchemaAttributes(XmlSchemaElement parentElement)
Parameter Type Description
parentElement XmlSchemaElement

The parent System.Xml.Schema.XmlSchemaElement.

Returns

IEnumerable<XmlSchemaAttribute>:

The child System.Xml.Schema.XmlSchemaAttribute objects.

See Also

ResolveSchemaAttribute(XmlSchemaAttribute)

Resolves the specified System.Xml.Schema.XmlSchemaAttribute in the event it is a reference to another System.Xml.Schema.XmlSchemaAttribute.

XmlSchemaAttribute ResolveSchemaAttribute(XmlSchemaAttribute attribute)
Parameter Type Description
attribute XmlSchemaAttribute

The System.Xml.Schema.XmlSchemaAttribute to examine.

Returns

XmlSchemaAttribute:

The resolved System.Xml.Schema.XmlSchemaAttribute.

See Also

See Also