Share via


Schema.SchemaLocation Property

Custom XML Schema Location.Represents the attribte in schema: sl:schemaLocation

Namespace:  DocumentFormat.OpenXml.CustomXmlSchemaReferences
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<SchemaAttrAttribute(, "schemaLocation")> _
Public Property SchemaLocation As StringValue
    Get
    Set
'Usage
Dim instance As Schema
Dim value As StringValue

value = instance.SchemaLocation

instance.SchemaLocation = value
[SchemaAttrAttribute(, "schemaLocation")]
public StringValue SchemaLocation { get; set; }

Property Value

Type: DocumentFormat.OpenXml.StringValue
Returns StringValue.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the location of the XML schema file which should be downloaded and parsed when this document is loaded.

Consider a WordprocessingML document which contains custom XML markup in the https://www.contoso.com namespace, which is defined by an XML schema located at c:\contoso.xsd. The following content would be displayed in the document's schema library data:

<w:schemaLibrary>
  <w:schema w:uri="https://www.contoso.com" w:schemaLocation= "c:\contoso.xsd" />
</w:schemaLibrary>

The schemaLocation attribute contains c:\contoso.xsd which is the location of the XML schema file used when this namespace is used.

The possible values for this attribute are defined by the XML Schema string data type.

See Also

Reference

Schema Class

Schema Members

DocumentFormat.OpenXml.CustomXmlSchemaReferences Namespace