Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Schema class

Custom XML Schema Reference. When the object is serialized out as xml, its qualified name is sl:schema.

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.CustomXmlSchemaReferences.Schema

Namespace:  DocumentFormat.OpenXml.CustomXmlSchemaReferences
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
public class Schema : OpenXmlLeafElement

[ISO/IEC 29500-1 1st Edition]

schema (Custom XML Schema Reference)

This element specifies the properties associated with a single XML namespace, for which all known XML schemas shall be loaded in order to validate the custom XML markup stored within this document. These properties can be used appropriately to locate custom XML schema(s) for use with the document. /IEC 29500 does not require any particular XML schema language.

[Note: Some examples of XML schema languages that might be used to implement Custom XML Mappings include:

  • W3C XML Schema - http://www.w3.org/XML/Schema

  • RELAX NG – /IEC 19757-2

  • Schematron – /IEC 19757-3

  • – /IEC 19757-4

end note]

[Example: Consider a WordprocessingML document which contains custom XML markup in the http://www.example.com namespace. The following content would be displayed in the document's schema library data:

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

The schema element contains the properties for this one XML namespace: in this case, a namespace of http://www.example.com and a file location of c:\example.xsd. end example]

[Note: This element is not intended to reintroduce transitional schema into the strict conformance class. end note]

Parent Elements

schemaLibrary (§23.2.2)

Attributes

Description

manifestLocation (Supplementary XML File Location)

Specifies the location of a supplementary XML file which can be downloaded and parsed when this document is loaded in order to provide additional application-defined capabilities. The contents of this file are application-defined.

[Example: Consider a WordprocessingML document which contains custom XML markup in the http://www.example.com namespace, which is associated with a resource file located at http://www.example.com/resource.xml. The following content would be displayed in the document's schema library data:

<sl:schemaLibrary>
  <sl:schema sl:uri="http://www.example.com" sl:manifestLocation= "http://www.example.com/resource.xml" />
</
sl:schemaLibrary>

The manifestLocation attribute contains http://www.example.com/manifest.xml which is the location of a resource file that can be downloaded for use when this namespace is used. end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

schemaLanguage (Schema Language)

Specifies the media type or the root namespace of the schema language.

[Example:

<sl:schema … schemaLanguage="http:/relaxng.org/ns/structure/1.0" />

end example]

The possible values for this attribute are defined by the W3C XML Schema token datatype.

schemaLocation (Custom XML Schema Location)

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

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

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

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

The possible values for this attribute are defined by the W3C XML Schema string datatype.

uri (Custom XML Schema Namespace)

Specifies the target namespace for the XML Schema associated with this schema reference.

[Example: Consider the following content for custom XML namespace data:

…<sl:schema w:uri="http://www.example.com/schema1" />
<sl:schema w:uri="http://www.example.com/schema2" />
…

The uri attribute specifies the target namespace of each XML schema reference:

  • http://www.example.com/schema1

  • http://www.example.com/schema2

Applications can then locate and utilize a schema for these namespaces using any means available. end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_Schema) is located in §A.7. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.