Replaced DocumentFactory with DocumentType.