Schematron is a language for expression of XML validation rules and constraints. Rule-based, tree patterns, using XPath as language.
Reference implementation in XSLT. A .Net version is at at schematron.net. Versions for Perl and PHP also available.
Language is simple, consisting of asserts (absence of pattern), reports (presence of patterns), rules, patterns, schemas, and phase (for workflow).