The W3C XML Schema Language
The W3C XML Schema Language (often misleadingly labeled simply "schemas") is a very powerful but very complex language. The primary feature of this language, relative to other schema languages, is data typing, especially for attribute values and simple element text. This language can state that a particular element or attribute contains an int, a date, a string, a double, a qualified name, a positive integer, and so on. Beyond the 42 simple types it defines, developers can extend the language with their own types such as money, phone number, color, and more.
Key features of this language include the following:
The W3C XML Schema Language is most appropriate when:
The W3C XML Schema Language is least appropriate when:
There are times when the W3C XML Schema Language is the right tool, but these cases aren't nearly as common as many developers think. It is just one tool in the XML toolbox, and a rather specialized one at that. The W3C XML Schema Language is sort of like a Torx T-15 screwdriver—crucial for certain jobs but not nearly as broadly useful as Phillips or flathead screwdrivers. With that in mind, let's look at some of the other schema tools in the XML toolbox.