Schema.SchemaLocation Property

Definition

Custom XML Schema Location

Represents the following attribute in the schema: sl:schemaLocation

[DocumentFormat.OpenXml.SchemaAttr(25, "schemaLocation")]
public DocumentFormat.OpenXml.StringValue SchemaLocation { get; set; }
public DocumentFormat.OpenXml.StringValue SchemaLocation { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(25, "schemaLocation")]
public DocumentFormat.OpenXml.StringValue? SchemaLocation { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("sl:schemaLocation")]
public DocumentFormat.OpenXml.StringValue? SchemaLocation { get; set; }
public DocumentFormat.OpenXml.StringValue? SchemaLocation { get; set; }
member this.SchemaLocation : DocumentFormat.OpenXml.StringValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr(25, "schemaLocation")>]
member this.SchemaLocation : DocumentFormat.OpenXml.StringValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr("sl:schemaLocation")>]
member this.SchemaLocation : DocumentFormat.OpenXml.StringValue with get, set
Public Property SchemaLocation As StringValue

Property Value

Returns StringValue.

Attributes

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 http://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="http://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.

Applies to