Data.xml:
have a default namespace
xmlns="http://www.mysite.com/name"
have a xsi namespace declaration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
have a schemaLocation which specifies All the namespace and its corresponding schema file location( absolute or relative )
xsi:schemaLocation="http://www.mysite.com/name name.xsd"
<name xmlns="http://www.mysite.com/name"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mysite.com/name name.xsd"
title="Mr." >
Data.xsd
The namespace of the <schema> element is http://www.w3.org/2001/XMLSchema.
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace attribute indicates that the vocabulary is for the namespace, or what this schema is target at
You can declare a namespace that matches your targetNamespace with the prefix target to refer to any declarations within your XML Schema.
xmlns:target="http://www.mysite.com/name"
targetNamespace="http://www.mysite.com/name"
The attribute elementFormDefault controls the way namespaces are used within your corresponding XML document.
elementFormDefault="qualified"
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:target="http://www.mysite.com/name"
targetNamespace="http://www.mysite.com/name"
elementFormDefault="qualified">
</schema>
The XML <Schema> Namespace
There are three choces, the xs namespace is recommended, the first is also very common:
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
or
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">