modify write_declaration to fail for every document type except xml