Programmatically create a new docType