You may be able to define the constraints you want to check using other validation technologies such as Relax NG or Schematron, or you may find it simpler and more flexible to write an XSLT stylesheet to perform validation of your source: write a template rule for each element, check all the necessary conditions, and generate a result document containing the errors.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference