Support matching Schema and Document objects.

Previously the matcher expected strings with the schema or XML
document. This is less efficient when the document object has
already been built.