1.0 Introduction

In order for document processing to be reliable, it is necessary to be able to describe classes of documents and to verify individual documents' membership in these classes -- in other words, to be able to express constraints on documents and thus define 'document types'. XML inherits a mechanism for doing this from SGML: the Document Type Definition. XML DTDs can perform a subset of the functions of SGML DTDs.

DTDs have limited expressiveness and it is necessary to experiment with new ideas in schema design. These ideas include a syntax that is more like that of XML document content, certain kinds of extensibility and a cleaner separation between parsing and verifying. XSchema is an experimental schema language designed to provide a starting point for these experiments.

So that XSchemas will be immediately useful with existing software, the XSchema specification will describe a conversion from XSchema documents to DTDs.

This initial version of the XSchema specification is deliberately simple, providing an initial base for implementations while introducing as few complicating factors as possible. Authors accustomed to DTD creation will find their toolset constricted; it is hoped that supporting software and tools available from other standards will make up for this reduced toolset.

1.1 Status

The XSchema specification is the product of discussions on the xml-dev mailing list. This document has no official status. The editors have no affiliation with the World Wide Web Consortium (W3C), the organization developing and maintaining the XML standard, nor any affiliation with any W3C member organizations. While it is hoped that this document may eventually be submitted to the W3C as a Note, it is not an official specification and should be considered experimental.

1.2 Origin and Goals

Proposals for describing SGML document type definitions using document syntax rather than the separate declaration syntax have been under development for a number of years, and used by several tools for documentation. The current proposal arose from a number of concerns surrounding XML's usability and consistency. Originally conceived of as a mapping of DTD syntax to document syntax, the project has developed into an effort focused on creating schemas describing element and attribute structures rather than preserving every function provided by XML 1.0 DTDs.

The list of goals developed by the xml-dev discussion follows:

  1. XSchema documents shall use XML document syntax, using element nesting and attributes to describe all constraints that may be verified by a processor using XSchema .
  2. XSchema shall define a transformation from XSchema documents to DTDs.
  3. XSchema documents shall be capable of representing the normalized element and attribute structures defined in XML 1.0 DTDs, and provide namespace support.
  4. XSchema documents shall be parseable, manageable, and manipulable using the same tools used to parse, manage, and manipulate XML documents.
  5. XSchema documents shall be easy to create, read, and modify, and shall provide authoring support for XML documents.
  6. XSchema documents shall be easy to use in combination with a parser to provide structural validation of documents.
  7. XSchema shall include an XSchema document and an XML 1.0 DTD defining the structure of XSchema documents .
  8. XSchema shall suggest mechanisms for applying XSchema documents to documents.
  9. XSchema shall include mechanisms for extending the information included in XSchema documents to support metadata.
  10. The XSchema specification shall be readable, clear, and rigorous, using terminology and nomenclature as close to the XML 1.0 specification as possible.
  11. The XSchema specification will comply with and be consistent with W3C recommendations.
  12. XSchema documents shall provide constructs for human- and machine-readable documentation.

1.3 Relation to Standards

XSchemas use XML 1.0 document instance syntax and may be applied to XML 1.0 documents. XSchemas are also designed to make use of XML namespaces. It is hoped that XSchemas and RDF Schemas may be mapped to each other. This specification has also been influenced by the discussion of the XML-Data proposal made to the W3C on 5 January, 1998. XSchema also refers to several IETF standards, notably Multipurpose Internet Mail Extensions (MIME).

1.4 Terminology

may - XSchemas are permitted but not required to behave as described.

must - XSchemas must behave as described. Failure to behave as described constitutes an error.

error - A breach of the rules set forth in this specification. Software should report this error to the user.

element

attribute

[to be filled in as the specification develops.]