This section describes what is a schema and what is a schema XML representation.
What is a schema? A schema is a container for schema components that defines a set of rules
to which an XML document must conform in order to be considered 'valid' according to that schema.
There are 7 types of schema components that mentioned in the XML Schema specification:
Named type definition component - Defines a named simple or complex datatype.
Attribute declaration component - Declares an attribute to be used in element declarations.
Element declaration component - Declares an XML element for the XML document to be validated.
Named attribute group definition component - Defines a named attribute group.
Name model group definition component - Defines a named model group.
Notation declaration component - Declares a notation.
A schema can be represented in XML by one or more schema documents, commonly called XSD (XML Schema Definition) documents
In another word, a schema XML document, XSD file, may contain one complete schema, or a part of one schema.
For example, the following XML document, hello.xsd, is the XML representation, XSD document, of a schema
which contains only 1 component, an element declaration component that defines a validation rule
for the XML document to be validated.
Apparently, the validation rule defined in hello.xsd says that the XML document to be validated can have a root element
named as "p" with no attributes and no sub (child) elements. But it can have a "string" as its text content.
Base this concept, the more technically correct definition of an XSD document should be:
What is an XSD document? An XSD document is the XML representation
of an XML schema, or a part of an XML schema, expressed in XML Schema language.