The schemaLocation attribute references an XML Schema document that has a target namespace.

<xsi:schemaLocation="list of anyURI" >


  • anyURI (list)
    The location of a schema that contains qualified (a schema with a namespace) schema constructs. The first URI reference in each pair is a namespace name, and the second is the location of a schema that describes that namespace.


This attribute associates an XML Schema document that has a target namespace with an instance document.

An XML Schema is not required to have a namespace. To specify the location for an XML Schema that does not have a target namespace, use the noNamespaceSchemaLocation attribute. The XML Schema referenced in this attribute cannot have a target namespace. Because this attribute does not take a list of URLs, you can only specify one schema location.

Associates a schema document that have a target namespace with an instance document. Multiple pairs of URI references can be listed, each with a different namespace name part.

According to the World Wide Web Consortium (W3C) XML Schema Recommendation, XML instance documents can have both xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes specified. In addition, you can list the same namespace several times.

In MSXML 6.0, if you have specified a xsi:schemaLocation and processed an element from that namespace, you can't specify a new xsi:schemaLocation. MSXML 6.0 reports an error for this situation. Previous versions reported no error.


The following example shows the use of xsi:schemaLocation attribute that provides location information for several XML Schema documents.

   xmlns:v=" /Vehicles"

See Also


XML Schemas (XSD) Reference
XML Schema Elements
XML Schema Instance Attributes