rewrite new_doc (refs #2785)
rewrite createDoc (refs #2785)