The W3C XML Schema specification has advanced to the 'Proposed Recommendation' stage, indicating that "the specification is stable and that implementation experience has been gathered, showing that each feature of the specification can be implemented." The three-part document has been produced as part of the W3C XML Activity. This PR version replaces the Candidate Recommendation of October 24, 2000. The deadline for review of the PR specification is Monday April 16, 2001. Review comments may be sent to the publicly archived 'xmlschema-dev' mailing list at email@example.com. As with the Candidate Recommendation, "the XML Schema PR specification consists of three parts. One part defines a set of simple datatypes, which can be associated with XML element types and attributes; this allows XML software to do a better job of managing dates, numbers, and other special forms of information. The second part of the specification proposes methods for describing the structure and constraining the contents of XML documents, and defines the rules governing schema-validation of documents. The third part is a primer, which explains what schemas are, how they differ from DTDs, and how someone builds a schema."
XML Schema namespace: http://www.w3.org/2001/XMLSchema. See namespace declarations from the 'XML Schema schema for XML Schemas: Part 1: Structures': <xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="Id: XMLSchema.xsd,v 1.45 2001/03/16 17:37:02 ht Exp " xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN">. At the end of the URI: "XML Schema... This document describes [will describe] the XML Schema namespace. It also contains a directory of links to these related resources, using Resource Directory Description Language..."
From the Primer Introduction:
This document, XML Schema Part 0: Primer, provides an easily approachable description of the XML Schema definition language, and should be used alongside the formal descriptions of the language contained in Parts 1 and 2 of the XML Schema specification. The intended audience of this document includes application developers whose programs read and write schema documents, and schema authors who need to know about the features of the language, especially features that provide functionality above and beyond what is provided by DTDs. The text assumes that you have a basic understanding of XML 1.0 and XML-Namespaces. Each major section of the primer introduces new features of the language, and describes those features in the context of concrete examples.
Section 2 covers the basic mechanisms of XML Schema. It describes how to declare the elements and attributes that appear in XML documents, the distinctions between simple and complex types, defining complex types, the use of simple types for element and attribute values, schema annotation, a simple mechanism for re-using element and attribute definitions, and nil values.
Section 3, the first advanced section in the primer, explains the basics of how namespaces are used in XML and schema documents. This section is important for understanding many of the topics that appear in the other advanced sections.
Section 4, the second advanced section in the primer, describes mechanisms for deriving types from existing types, and for controlling these derivations. The section also describes mechanisms for merging together fragments of a schema from multiple sources, and for element substitution.
Section 5 covers more advanced features, including a mechanism for specifying uniqueness among attributes and elements, a mechanism for using types across namespaces, a mechanism for extending types based on namespaces, and a description of how documents are checked for conformance.
In addition to the sections just described, the primer contains a number of appendices that provide detailed reference information on simple types and a regular expression language.
From the Part 1: Structures document:
XML Schema: Structures specifies the XML Schema definition language, which offers facilities for describing the structure and constraining the contents of XML 1.0 documents, including those which exploit the XML Namespace facility. The schema language, which is itself represented in XML 1.0 and uses namespaces, substantially reconstructs, and considerably extends the capabilities found in XML 1.0 document type definitions (DTDs). This specification depends on XML Schema Part 2: Datatypes.
The purpose of XML Schema: Structures is to define the nature of XML schemas and their component parts, provide an inventory of XML markup constructs with which to represent schemas, and define the application of schemas to XML documents.
The purpose of an XML Schema: Structures schema is to define and describe a class of XML documents by using schema components to constrain and document the meaning, usage and relationships of their constituent parts: datatypes, elements and their content and attributes and their values. Schemas may also provide for the specification of additional document information, such as normalization and defaulting of attribute and element values. Schemas have facilities for self-documentation. Thus, XML Schema: Structures can be used to define, describe and catalogue XML vocabularies for classes of XML documents.
Any application that consumes well-formed XML can use the XML Schema: Structures formalism to express syntactic, structural and value constraints applicable to its document instances. The XML Schema: Structures formalism allows a useful level of constraint checking to be described and implemented for a wide spectrum of XML applications. However, the language defined by this specification does not attempt to provide all the facilities that might be needed by any application. Some applications may require constraint capabilities not expressible in this language, and so may need to perform their own additional validations.
From the Part 2: Datatypes document:
XML Schema: Datatypes is part 2 of the specification of the XML Schema language. It defines facilities for defining datatypes to be used in XML Schemas as well as other XML specifications. The datatype language, which is itself represented in XML 1.0, provides a superset of the capabilities found in XML 1.0 document type definitions (DTDs) for specifying datatypes on elements and attributes.
The XML Schema Requirements document spells out concrete requirements to be fulfilled by this specification, which state that the XML Schema Language must:
- provide for primitive data typing, including byte, date, integer, sequence, SQL and Java primitive datatypes, etc.;
- define a type system that is adequate for import/export from database systems (e.g., relational, object, OLAP);
- distinguish requirements relating to lexical data representation vs. those governing an underlying information set;
- allow creation of user-defined datatypes, such as datatypes that are derived from existing datatypes and which may constrain certain of its properties (e.g., range, precision, length, format).
Scope: This portion of the XML Schema Language discusses datatypes that can be used in an XML Schema. These datatypes can be specified for element content that would be specified as #PCDATA and attribute values of various types in a DTD. It is the intention of this specification that it be usable outside of the context of XML Schemas for a wide range of other XML-related activities such as XSL and RDF Schema.
- XML Schema Part 1: Structures W3C Proposed Recommendation 16-March-2001. Edited by Henry S. Thompson (University of Edinburgh), David Beech (Oracle Corporation), Murray Maloney (for Commerce One), and Noah Mendelsohn (Lotus Development Corporation).
- XML Schema Part 1, Latest version URL
- XML Schema for Part 1: Structures
- XML DTD for Part 1: Structures
- Part 1: Structures, XML format
- XML Schema Part 2: Datatypes. W3C Proposed Recommendation 16-March-2001. Edited by Paul V. Biron (Kaiser Permanente, for Health Level Seven) and Ashok Malhotra (Microsoft, formerly of IBM).
- XML Schema Part 2, Latest version URL
- Schema for Datatypes
- DTD for Datatypes
- Schema for built-in datatypes only, in a separate namespace