About two years ago, the W3C XML Schema Working Group released the fruits of its labors into an eager world. The specification was titled simply "XML Schema." This has unfortunately given many people the mistaken idea that the language the group invented is the only schema language and that all others are doomed to fall by the wayside. In fact, nothing could be further from the truth. There are numerous XML schema languages available today, all with their own strengths and weaknesses. It behooves you to familiarize yourself with the different possibilities and to select the one that best fits your problem. Indeed, there's no reason you have to select only one. It's often useful to mix and match several schema languages and perform multiple layers of validation.
Four main schema languages are being actively developed and supported at the current time. Doubtless there will be more in the future but, in my opinion, today these four will most effectively achieve almost any end:
Finally, some constraints are always going to require a traditional programming language such as Python, Java, or C++ to verify. I'll also explore the use of procedural code to verify constraints.