Schema.SchemaLocation 属性

定义

自定义 XML 架构位置

表示架构中的以下属性: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

属性值

返回 StringValue

属性

注解

使用此类时,ECMA 国际标准 ECMA-376 中的以下信息可能很有用。

指定在加载此文档时应下载和分析的 XML 架构文件的位置。

请考虑一个 WordprocessingML 文档,该文档在 命名空间中包含 http://www.contoso.com 自定义 XML 标记,该标记由 位于 的 c:\contoso.xsdXML 架构定义。 以下内容将显示在文档的架构库数据中:

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

属性 schemaLocation 包含 c:\contoso.xsd ,它是使用此命名空间时使用的 XML 架构文件的位置。

此属性的可能值由 XML 架构 string 数据类型定义。

适用于