DocumentValidator based on PolyType validator interface

This is not a ready-to-merge solution, it makes assumptions not limited
to this package. But you can at least have a look now.