Now, while it's certainly possible to build a schema in the manner just described, with the schema definition following the structure of the document instance, such a schema can prove difficult to maintain and read with long and complex documents. Consequently, the XML Schema specification allows for an alternative method of schema construction, whereby elements and attributes can be defined separately and then referenced wherever required.
An example might help to make this clearer - consider the following revision of the previous example:
In this form of construction, each element and attribute is defined separately
and can be referenced by any other element definition via the "ref" attribute. This type of schema definition is much easier to read than the previous one.