doctype parsing