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.
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.
SchemaSet
Gets or sets the XmlSchemaSet to use.
XmlSchemaSet SchemaSet { get; set; }
Property Value
- XmlSchemaSet:
The XmlSchemaSet to use.
Remarks
This property can be set if you already have a XmlSchemaSet
loaded that should directly be used.
Methods
GetChildSchemaElement(XmlSchemaElement, XmlQualifiedName)
Returns the child XmlSchemaElement that has the specified qualified name.
XmlSchemaElement GetChildSchemaElement(XmlSchemaElement parentElement, XmlQualifiedName name)
Parameter | Type | Description |
---|---|---|
parentElement | XmlSchemaElement | The parent XmlSchemaElement. |
name | XmlQualifiedName | The XmlQualifiedName for which to search. |
Returns
- XmlSchemaElement:
The child XmlSchemaElement that has the specified qualified name.
GetChildSchemaElements(XmlSchemaElement)
Returns the child XmlSchemaElement objects.
IEnumerable<XmlSchemaElement> GetChildSchemaElements(XmlSchemaElement parentElement)
Parameter | Type | Description |
---|---|---|
parentElement | XmlSchemaElement | The parent XmlSchemaElement. |
Returns
- IEnumerable<XmlSchemaElement>:
The child XmlSchemaElement objects.
GetDocumentation(XmlSchemaAnnotated)
Returns the XSD documentation for the specified source object.
string GetDocumentation(XmlSchemaAnnotated source)
Parameter | Type | Description |
---|---|---|
source | XmlSchemaAnnotated | The source 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 XmlSchemaDocumentation child nodes together, with whitespace in between.
GetGlobalSchemaElement(XmlQualifiedName)
Returns the global XmlSchemaElement that has the specified qualified name.
XmlSchemaElement GetGlobalSchemaElement(XmlQualifiedName name)
Parameter | Type | Description |
---|---|---|
name | XmlQualifiedName | The XmlQualifiedName for which to search. |
Returns
- XmlSchemaElement:
The global XmlSchemaElement that has the specified qualified name.
GetGlobalSchemaElements()
Returns the collection of global XmlSchemaElement objects.
IEnumerable<XmlSchemaElement> GetGlobalSchemaElements()
Returns
- IEnumerable<XmlSchemaElement>:
The collection of global XmlSchemaElement objects.
GetSchemaAttributes(XmlSchemaElement)
Returns the child XmlSchemaAttribute objects.
IEnumerable<XmlSchemaAttribute> GetSchemaAttributes(XmlSchemaElement parentElement)
Parameter | Type | Description |
---|---|---|
parentElement | XmlSchemaElement | The parent XmlSchemaElement. |
Returns
- IEnumerable<XmlSchemaAttribute>:
The child XmlSchemaAttribute objects.
ResolveSchemaAttribute(XmlSchemaAttribute)
Resolves the specified XmlSchemaAttribute in the event it is a reference to another XmlSchemaAttribute.
XmlSchemaAttribute ResolveSchemaAttribute(XmlSchemaAttribute attribute)
Parameter | Type | Description |
---|---|---|
attribute | XmlSchemaAttribute | The XmlSchemaAttribute to examine. |
Returns
- XmlSchemaAttribute:
The resolved XmlSchemaAttribute.