XML Schema is more powerful than DTD. One of the most important capabilities of XML Schema is its support for data types. It is easier to describe the allowed document content. It is easier to verify the correctness of the data. Makes it easier to work with data from the database Data constraints can be more easily defined (data facets) It is easier to define a data model (or data format) It is easier to convert data between different data types Editor’s note: data constraint, or facets, is a term in the XML Schema prototype, which can be translated as “face” in Chinese and is used to constrain the allowable values of data types. Another important feature about XML Schema is that they are written by XML. There is no need to learn a new language You can use the XML editor to edit Schema files You can use the XML parser to parse Schema files Schema can be handled through XML DOM Schema can be converted through XSLT When data is sent from the sender to the receiver, the point is that both parties should have the same “expected value” about the content. With XML Schema, the sender can describe the data in a way that the recipient can understand. One kind of data, such as “03-11-2004”, is interpreted as November 3 in some countries and March 11 in others. But a XML element with a data type, such as < date type= “date” > 2004-03-11 < / date >, ensures a consistent understanding of the content, because the format required by XML’s data type “date” is “YYYY-MM-DD”. XML Schema are extensible because they are written by XML. Reuse your Schema in other Schema Create your own data types derived from standard types Reference multiple Schema in the same document We refer to documents that conform to XML syntax as well-formed XML documents, such as: It must start with a XML declaration It must have a unique root element. The start tag must match the end tag Elements are case sensitive All elements must be closed All elements must be nested correctly Entities must be used for special characters Even if the documents are well formed, there is no guarantee that they will not contain errors, and these errors can have serious consequences. Please consider the following situation: you ordered 5 dozen laser printers instead of 5. With XML Schema, most of these errors will be caught by your validation software.XML Schema supports data types ¶
Through support for data types: ¶
XML Schema uses XML syntax ¶
There are many benefits to writing XML Schema by XML: ¶
XML Schema protects data communication ¶
XML Schema Extensible ¶
With extensible Schema definitions, you can: ¶
Good form is not enough. ¶