HOME

Schema Tutorial
XSD HOME
XSD Intro
XSD Why
XSD HowTo
XSD <schema>

Simple Types
XSD Elements
XSD Attributes
XSD Restrictions

Complex Types
XSD Elements
XSD Empty
XSD Elements Only
XSD Text Only
XSD Mixed
XSD Indicators
XSD <any>
XSD <anyAttribute>
XSD Substitution
XSD Example

Data Types
XSD String
XSD Date
XSD Numeric
XSD Misc

References
XSD Reference
Download XMLSpy here
Please visit our sponsors !

Introduction to XML Schema

prev next

XML Schema is an XML based alternative to DTD.

An XML schema describes the structure of an XML document.

The XML Schema language is also referred to as XML Schema Definition (XSD).


What You Should Already Know

Before you study the XML Schema Language, you should have a basic understanding of XML and XML Namespaces. It will also help to have some basic understanding of DTD.

If you want to study these subjects first, please visit our XML tutorial and our DTD tutorial.


What is an XML Schema?

The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD.

An XML Schema:

  • defines elements that can appear in a document
  • defines attributes that can appear in a document
  • defines which elements are child elements
  • defines the order of child elements
  • defines the number of child elements
  • defines whether an element is empty or can include text
  • defines data types for elements and attributes
  • defines default and fixed values for elements and attributes

XML Schemas are the Successors of DTDs

We think that very soon XML Schemas will be used in most Web applications as a replacement for DTDs. Here are some reasons:

  • XML Schemas are extensible to future additions
  • XML Schemas are richer and more useful than DTDs
  • XML Schemas are written in XML
  • XML Schemas support data types
  • XML Schemas support namespaces

XML Schema is a W3C Recommendation

XML Schema was originally proposed by Microsoft, but became an official W3C recommendation in May 2001.

The specification is now stable and has been reviewed by the W3C Membership.

For a full overview of W3C Activities and Status, visit our W3C tutorial.


prev next

Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


Search W3Schools:


What Others Say About Us

Does the world know about us? Check out these places:

Dogpile Alta Vista MSN Google Excite Lycos Yahoo Ask Jeeves


We Help You For Free. You Can Help Us!


W3Schools is for training only. We do not warrant its correctness or its fitness for use. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2002 by Refsnes Data. All Rights Reserved


Validate How we converted to XHTML Validate

Domain Name Registration
Domain Name
Registration & More!



Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search