Some extra v6 stuff for doctypes

pretty sure this makes it not work on the v6.0.x branch - prob going to
ditch support for that one.