XML Schema is a XML-based DTD replacement.
XML Schema describes the structure of XML documents.
The XML Schema language can also be referenced as XSD (XML Schema Definition).
The basic knowledge you should have ¶
Before continuing, you need to have a basic understanding of the following knowledge:
-
HTML / XHTML
-
XML and XML namespaces
-
A basic understanding of DTD
If you want to learn about these projects first, please visit 首页 Access these tutorials.
What is XML Schema? ¶
The role of XML Schema is to define legal building blocks for XML documents, similar to DTD.
XML Schema: ¶
-
Define the elements that can appear in the document
-
Define attributes that can appear in the document
-
Define which element is a child element
-
Define the order of child elements
-
Define the number of child elements
-
Defines whether the element is empty or can contain text
-
Define data types for elements and attributes
-
Define default values and fixed values for elements and attributes
XML Schema is the successor to DTD. ¶
We think XML Schema will soon replace DTD in most web applications.
The reasons are as follows: ¶
-
XML Schema can be extended to meet future needs
-
XML Schema is more perfect and more powerful
-
XML Schema is written based on XML
-
XML Schema supports data types
-
XML Schema supports namespaces
XML Schema is a W3C standard ¶
XML Schema became the W3C standard on May 2, 2001.
You can find it in our W3C 教程 For more information about the XML Schema standard.