I have test this patch and found that it requires setting XHTML1_RDFA doctype or using my own custom doctupe with "rdfa" string present on it. So if I use any other doctype, i can't set no Open Graph meta tags in document.
Official protocol specification http://ogp.me/ says nothing about doctype.
http://www.imdb.com/title/tt0117500/ don't use RDFa doctype
http://www.pravda.com.ua/news/2011/01/3/5746644/ don't use RDFa doctype
RDF documentation says that doctupe MAY be used instead of requisition.
http://www.w3.org/TR/2010/WD-xhtml-rdfa-20100803/
Documents written using the markup language defined in this specification can be validated using the DTD defined in Appendix B. If a document author wants to facilitate such validation, they may include the following declaration at the top of their document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
{/quote}
This paragraph may be found also in HTML 4.01 RDFa specification
So I must use custom doctype with "rdfa" string inside instead of predefined constant.
I propose to remove doctype testing
See Attached Patch