Implement document builder.