Adapt to target doctype