| Previous | Next
Schemas ReferenceContents:The Schema Namespaces
The W3C XML Schema Language (schemas) is a declarative language used to describe the allowed contents of XML documents by assigning types to elements and attributes. The schema language includes several dozen standard types and allows you to define your own custom types. The combination of the information in an XML document instance and the types in that document as defined by the schema is sometimes called the Post Schema Validation Infoset (PSVI). A schema processor reads both an input XML document and a schema (which is itself an XML document because the W3C XML Schema Language is an XML application) and returns a Boolean result specifying whether the document adheres to the constraints in the schema. A document that satisfies all the schema's constraints and in which all the document's elements and attributes are declared is said to be schema-valid, though in this chapter we will mostly just call such documents valid. A document that does not satisfy all of the constraints is said to be invalid. The Schema NamespacesAll standard schema elements are in the http://www.w3.org/2001/XMLSchema namespace. Now, we assume that this URI is mapped to the <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> In addition, several attributes are used in instance documents to associate schema information with them, including In a few cases, schema elements may contain elements from other, arbitrary namespaces or no namespace at all. This occurs primarily inside Finally, most schema elements can have arbitrary attributes from other namespaces. For instance, this allows you to make an |