An XML schema provides the definition of an XML document. This implies that an XML schema defines the following in an XML document:
The elements that can appear in an XML document.
The attributes that can appear in an XML document.
The elements that are child elements.
The order of child elements.
The number of child elements.
Whether an element is empty or it includes some text.
The data types for elements and attributes.