Framework within which multiple validation tasks of different types can be applied to an XML document