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"
anzeigen, daß alle mögliche Elemente, die durch das XML Falldokument benutzt werden, die in diesem Schema erklärt wurden, qualifiziertes namespace sein müssen.
Beziehen eines Schemas in einem XML Dokument
Dieses XML Dokument hat einen Hinweis auf ein XML Schemata:
<?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>
Das folgende Fragment:
xmlns="http://www.academictutorials.com"
die Rückstellung namespace Erklärung spezifizieren. Diese Erklärung erklärt dem Schemavalidator, daß alle Elemente, die in diesem XML Dokument benutzt werden, im „http://www.w3schools.com“ namespace erklärt werden.
Sobald du hast, ist das XML Schema-Fallnamespace vorhanden:
du kannst schemaLocation Attribut verwenden. Dieses Attribut enthalten zwei Werte. Der erste Wert ist immer das zu verwenden namespace. Der zweite Wert ist die Position der für dieses namespace zu verwenden XML Schemata: