Schemas and Schema Documents
Technically, a schema is an abstract collection of metadata, consisting of a set of schema components: chiefly element and attribute declarations and complex and simple type definitions. These components are usually created by processing a collection of schema documents, which contain the source language definitions of these components. In popular usage, however, a schema document is often referred to as a schema.
Schema documents are organized by namespace: all the named schema components belong to a target namespace, and the target namespace is a property of the schema document as a whole. A schema document may include other schema documents for the same namespace, and may import schema documents for a different namespace.
When an instance document is validated against a schema (a process known as assessment), the schema to be used for validation can either be supplied as a parameter to the validation engine, or it can be referenced directly from the instance document using two special attributes, xsi:schemaLocation
and xsi:noNamespaceSchemaLocation
. (The latter mechanism requires the client invoking validation to trust the document sufficiently to know that it is being validated against the correct schema. "xsi" is the conventional prefix for the namespace "http://www.w3.org/2001/XMLSchema-instance".)
XML Schema Documents usually have the filename extension ".xsd". A unique Internet Media Type is not yet registered for XSDs, so "application/xml" or "text/xml" should be used, as per RFC 3023.
Read more about this topic: XML Schema (W3C)
Famous quotes containing the word documents:
“Our medieval historians who prefer to rely as much as possible on official documents because the chronicles are unreliable, fall thereby into an occasionally dangerous error. The documents tell us little about the difference in tone which separates us from those times; they let us forget the fervent pathos of medieval life.”
—Johan Huizinga (18721945)