<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 may be used appropriately to locate custom XML schema(s) for use with the document.

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

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

Parent Elements

<schemaLibrary>8.2.2)

Attributes

Description

<manifestLocation> (Resource File Location)

Specifies the location of a resource file which should be downloaded and parsed when this document is loaded. The format and contents of this resource file are application-defined.

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

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

The possible values for this attribute are defined by the XML Schema string 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.

<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 datatype.

<uri> (Custom XML Schema Namespace)

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

<w:schema w:uri="http://www.contoso.com/schema1" />
<w:schema w:uri="http://www.contoso.com/schema2" />

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

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

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

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

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

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Schema">
	<attribute name="uri" type="xsd:string" default=""/>
	<attribute name="manifestLocation" type="xsd:string"/>
	<attribute name="schemaLocation" type="xsd:string"/>
</complexType>