I am currently playing with Schematron for XML Document [Data] Validation. Schematron appears to work suitably, at least in initial testing, and I like the general approach of user-centric validation coupled with XPath contexts/rules1.
However, I would like to have this same sort of "declarative validation" setup in POCC (Plain Old C# Code) as some of the validation that needs to be done is outside the scope of what Schematron can handle - at least without additional transformations or pipelines, and I don't like XML that much.
I've found a few libraries like Fluent Validation, similar posts and books, but nothing seems to be tailored to XML/XPath - but perhaps I am too enamored by the terse XPath syntax to understand how Linq-to-XML can really fit in ..
So the question is;
Is there a C# (.NET) fluent/declarative validation library that is tailored to leverage XPath and work with XML documents?
Before voting to close this as a "shopping question", consider the apparent scarcity/obscurity of such a library. It appears that some of the declarative validation libraries could be hacked up with such support, but after playing around a bit, it just doesn't "feel natural". Any practical experience extending fluent validation libraries to support XPath in this aspect would also make a good answer, especially if it has proven to be a suitable approach.
1 This project also uses XSD Schema validation for the structure/type validation (i.e. "well typed" validation). This phase of validation is about "correct semantics" validation; however, XSD does not generate "friendly" error messages, it cannot handle [co-]dependent values, and is .. more verbose. RELAX NG would solve at least one of these problems, but not all.