Introduce DocumentFactory