indicate that the elements and data types used in the schema come from the "http://www.w3.org/2001/XMLSchema"
namespace. It also specify that the elements and data types that come from
the "http://www.w3.org/2001/XMLSchema" namespace should be prefixed with xs:
indicate that the elements defined by this schema (note, to, from, heading, body.) come
from the "http://www.academictutorials.com" namespace.
This fragment:
xmlns="http://www.academictutorials.com"
indicate that the default namespace is "http://www.academictutorials.com".
This fragment:
elementFormDefault="qualified"
indicate that any elements used by the XML instance document which were declared in this schema
must be namespace qualified.
Referencing a Schema in an XML Document
This XML document has a reference to an XML Schemas:
<?xml version="1.0"?>
<note xmlns="http://www.academictutorials.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.academictutorials.com note.xsd">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
The following fragment:
xmlns="http://www.academictutorials.com"
specify the default namespace declaration. This declaration tells the schema-validator that all the elements used in this XML document are declared in the "http://www.w3schools.com" namespace.
Once you have the XML Schema Instance namespace is available:
you can use schemaLocation attribute.
This attribute contain two values. The first value is always the namespace to use.
The second value is the location of the XML schemas to use for that namespace: