Declarations : Introduction « XML Schema « XML Tutorial






To connect the two documents, you include a reference to the XML Schema within your instance document. 
You begin XML schema with the XML declaration, <?xml version="1.0"?>.
The root element within your XML Schema is the <schema> element.
Within the <schema> element, you have the namespace declaration.
The namespace of the <schema> element is http://www.w3.org/2001/XMLSchema.
targetNamespace attribute indicates that the vocabulary is for the namespace http://www.java2s.com/name. 
You can declare a namespace that matches your targetNamespace with the prefix target to refer to any declarations within your XML Schema. 
The attribute elementFormDefault controls the way namespaces are used within your corresponding XML document. 

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
        xmlns:target="http://www.java2s.com/name" 
        targetNamespace="http://www.java2s.com/name" 
        elementFormDefault="qualified"> 


</schema>








3.1.Introduction
3.1.1.Getting Started with XML Schemas
3.1.2.XML Schema defines the name vocabulary.
3.1.3. Declarations
3.1.4. element is the root element within an XML Schema.
3.1.5.Target Namespaces
3.1.6.Simple and Complex Types
3.1.7.Primitive Datatypes
3.1.8.Derived Datatypes
3.1.9.Useful built-in simple types
3.1.10.Create global complex types
3.1.11.Derivation by extension
3.1.12.Derivation by restriction