[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:22:22 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 74254fb9f42e28251e94f726ec7a753a47248fab
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 28 22:20:48 2003 +0000

    	New implementation of determineParseMode that is much better
    	about getting the quirks vs. strict decision right (as compared
    	to Mozilla and WinIE).
    
    	Also made a new inQuirksMode function and converted callers of
    	parseMode to use it, so that AlmostStrict and Strict modes will
    	both be treated as non-quirks mode by those who check for this
    	sort of thing.
    
            Reviewed by darin, mjs
    
            * khtml/html/html_documentimpl.cpp:
            (parsePS):
            (containsString):
            (parseDocTypeDeclaration):
            (HTMLDocumentImpl::determineParseMode):
            * khtml/html/html_headimpl.cpp:
            (HTMLLinkElementImpl::setStyleSheet):
            (HTMLStyleElementImpl::childrenChanged):
            * khtml/html/html_tableimpl.cpp:
            (HTMLTableElementImpl::attach):
            * khtml/html/htmlparser.cpp:
            (KHTMLParser::parseToken):
            * khtml/html/htmltokenizer.cpp:
            (HTMLTokenizer::parseTag):
            * khtml/khtml_part.cpp:
            (KHTMLPart::gotoAnchor):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::layoutBlockChildren):
            * khtml/rendering/render_list.cpp:
            (getParentOfFirstLineBox):
            * khtml/rendering/render_object.cpp:
            (RenderObject::createObject):
            * khtml/xml/dom_docimpl.cpp:
            (DocumentImpl::determineParseMode):
            * khtml/xml/dom_docimpl.h:
            * khtml/xml/dom_elementimpl.cpp:
            (ElementImpl::createDecl):
            * kwq/KWQString.mm:
            (QString::compare):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e16e0fc..e50cc03 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,46 @@
+2003-01-27  David Hyatt  <hyatt at apple.com>
+
+	New implementation of determineParseMode that is much better
+	about getting the quirks vs. strict decision right (as compared
+	to Mozilla and WinIE).
+
+	Also made a new inQuirksMode function and converted callers of
+	parseMode to use it, so that AlmostStrict and Strict modes will
+	both be treated as non-quirks mode by those who check for this
+	sort of thing.
+	
+        Reviewed by darin, mjs
+
+        * khtml/html/html_documentimpl.cpp:
+        (parsePS):
+        (containsString):
+        (parseDocTypeDeclaration):
+        (HTMLDocumentImpl::determineParseMode):
+        * khtml/html/html_headimpl.cpp:
+        (HTMLLinkElementImpl::setStyleSheet):
+        (HTMLStyleElementImpl::childrenChanged):
+        * khtml/html/html_tableimpl.cpp:
+        (HTMLTableElementImpl::attach):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::parseToken):
+        * khtml/html/htmltokenizer.cpp:
+        (HTMLTokenizer::parseTag):
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::gotoAnchor):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::layoutBlockChildren):
+        * khtml/rendering/render_list.cpp:
+        (getParentOfFirstLineBox):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::createObject):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::determineParseMode):
+        * khtml/xml/dom_docimpl.h:
+        * khtml/xml/dom_elementimpl.cpp:
+        (ElementImpl::createDecl):
+        * kwq/KWQString.mm:
+        (QString::compare):
+
 2003-01-28  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken and Maciej.
@@ -82,6 +125,7 @@
         (KWQKHTMLPart::doFakeMouseUpAfterWidgetTracking):  New routine to allow widgets
 	to get out event state fixed up after a modal tracking loop.
 
+>>>>>>> 1.1331
 2003-01-27  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e16e0fc..e50cc03 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,46 @@
+2003-01-27  David Hyatt  <hyatt at apple.com>
+
+	New implementation of determineParseMode that is much better
+	about getting the quirks vs. strict decision right (as compared
+	to Mozilla and WinIE).
+
+	Also made a new inQuirksMode function and converted callers of
+	parseMode to use it, so that AlmostStrict and Strict modes will
+	both be treated as non-quirks mode by those who check for this
+	sort of thing.
+	
+        Reviewed by darin, mjs
+
+        * khtml/html/html_documentimpl.cpp:
+        (parsePS):
+        (containsString):
+        (parseDocTypeDeclaration):
+        (HTMLDocumentImpl::determineParseMode):
+        * khtml/html/html_headimpl.cpp:
+        (HTMLLinkElementImpl::setStyleSheet):
+        (HTMLStyleElementImpl::childrenChanged):
+        * khtml/html/html_tableimpl.cpp:
+        (HTMLTableElementImpl::attach):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::parseToken):
+        * khtml/html/htmltokenizer.cpp:
+        (HTMLTokenizer::parseTag):
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::gotoAnchor):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::layoutBlockChildren):
+        * khtml/rendering/render_list.cpp:
+        (getParentOfFirstLineBox):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::createObject):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::determineParseMode):
+        * khtml/xml/dom_docimpl.h:
+        * khtml/xml/dom_elementimpl.cpp:
+        (ElementImpl::createDecl):
+        * kwq/KWQString.mm:
+        (QString::compare):
+
 2003-01-28  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken and Maciej.
@@ -82,6 +125,7 @@
         (KWQKHTMLPart::doFakeMouseUpAfterWidgetTracking):  New routine to allow widgets
 	to get out event state fixed up after a modal tracking loop.
 
+>>>>>>> 1.1331
 2003-01-27  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page
diff --git a/WebCore/khtml/html/Makefile.am b/WebCore/khtml/html/Makefile.am
index 3417261..9f5df0b 100644
--- a/WebCore/khtml/html/Makefile.am
+++ b/WebCore/khtml/html/Makefile.am
@@ -1,6 +1,9 @@
 kentities.c: kentities.gperf
 	$(GPERF) -a -L "ANSI-C" -C -G -c -o -t -k '*' -NfindEntity -D -s 2 $< > $@
 
-noinst_HEADERS = kentities.c
+doctypes.cpp: doctypes.gperf
+	$(GPERF) -CEot -L "C++" -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
+
+noinst_HEADERS = kentities.c doctypes.cpp
 BUILT_SOURCES = $(noinst_HEADERS)
 CLEANFILES = $(BUILT_SOURCES)
diff --git a/WebCore/khtml/html/doctypes.cpp b/WebCore/khtml/html/doctypes.cpp
new file mode 100644
index 0000000..7384d7e
--- /dev/null
+++ b/WebCore/khtml/html/doctypes.cpp
@@ -0,0 +1,825 @@
+/* C++ code produced by gperf version 2.7.2 */
+/* Command-line: gperf -CEot -L C++ -k '*' -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards doctypes.gperf  */
+struct PubIDInfo {
+    enum eMode { 
+        eQuirks,         
+        eQuirks3,       
+        eAlmostStandards
+    };
+
+    const char* name;
+    eMode mode_if_no_sysid;
+    eMode mode_if_sysid;
+};
+/* maximum key range = 566, duplicates = 0 */
+
+class Perfect_Hash
+{
+private:
+  static inline unsigned int hash (const char *str, unsigned int len);
+public:
+  static const struct PubIDInfo *findDoctypeEntry (const char *str, unsigned int len);
+};
+
+inline unsigned int
+Perfect_Hash::hash (register const char *str, register unsigned int len)
+{
+  static const unsigned short asso_values[] =
+    {
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570,   0, 570, 570, 570, 570, 570, 570,   0,
+      570, 570, 570,  25, 570,   0,   0,   0,   0,  50,
+       25,  15,  50,   5,   0,   0, 570,   0,   0, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570,   0,   0,   0,
+        0,   0,   0,   0,   0,   0,   0, 570,   0,   0,
+        0,   0,  40,   5,  40,   0,   0,   5,  90,  20,
+       60,   0,   0, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+      570, 570, 570, 570, 570, 570
+    };
+  register int hval = len;
+
+  switch (hval)
+    {
+      default:
+      case 80:
+        hval += asso_values[(unsigned char)str[79]];
+      case 79:
+        hval += asso_values[(unsigned char)str[78]];
+      case 78:
+        hval += asso_values[(unsigned char)str[77]];
+      case 77:
+        hval += asso_values[(unsigned char)str[76]];
+      case 76:
+        hval += asso_values[(unsigned char)str[75]];
+      case 75:
+        hval += asso_values[(unsigned char)str[74]];
+      case 74:
+        hval += asso_values[(unsigned char)str[73]];
+      case 73:
+        hval += asso_values[(unsigned char)str[72]];
+      case 72:
+        hval += asso_values[(unsigned char)str[71]];
+      case 71:
+        hval += asso_values[(unsigned char)str[70]];
+      case 70:
+        hval += asso_values[(unsigned char)str[69]];
+      case 69:
+        hval += asso_values[(unsigned char)str[68]];
+      case 68:
+        hval += asso_values[(unsigned char)str[67]];
+      case 67:
+        hval += asso_values[(unsigned char)str[66]];
+      case 66:
+        hval += asso_values[(unsigned char)str[65]];
+      case 65:
+        hval += asso_values[(unsigned char)str[64]];
+      case 64:
+        hval += asso_values[(unsigned char)str[63]];
+      case 63:
+        hval += asso_values[(unsigned char)str[62]];
+      case 62:
+        hval += asso_values[(unsigned char)str[61]];
+      case 61:
+        hval += asso_values[(unsigned char)str[60]];
+      case 60:
+        hval += asso_values[(unsigned char)str[59]];
+      case 59:
+        hval += asso_values[(unsigned char)str[58]];
+      case 58:
+        hval += asso_values[(unsigned char)str[57]];
+      case 57:
+        hval += asso_values[(unsigned char)str[56]];
+      case 56:
+        hval += asso_values[(unsigned char)str[55]];
+      case 55:
+        hval += asso_values[(unsigned char)str[54]];
+      case 54:
+        hval += asso_values[(unsigned char)str[53]];
+      case 53:
+        hval += asso_values[(unsigned char)str[52]];
+      case 52:
+        hval += asso_values[(unsigned char)str[51]];
+      case 51:
+        hval += asso_values[(unsigned char)str[50]];
+      case 50:
+        hval += asso_values[(unsigned char)str[49]];
+      case 49:
+        hval += asso_values[(unsigned char)str[48]];
+      case 48:
+        hval += asso_values[(unsigned char)str[47]];
+      case 47:
+        hval += asso_values[(unsigned char)str[46]];
+      case 46:
+        hval += asso_values[(unsigned char)str[45]];
+      case 45:
+        hval += asso_values[(unsigned char)str[44]];
+      case 44:
+        hval += asso_values[(unsigned char)str[43]];
+      case 43:
+        hval += asso_values[(unsigned char)str[42]];
+      case 42:
+        hval += asso_values[(unsigned char)str[41]];
+      case 41:
+        hval += asso_values[(unsigned char)str[40]];
+      case 40:
+        hval += asso_values[(unsigned char)str[39]];
+      case 39:
+        hval += asso_values[(unsigned char)str[38]];
+      case 38:
+        hval += asso_values[(unsigned char)str[37]];
+      case 37:
+        hval += asso_values[(unsigned char)str[36]];
+      case 36:
+        hval += asso_values[(unsigned char)str[35]];
+      case 35:
+        hval += asso_values[(unsigned char)str[34]];
+      case 34:
+        hval += asso_values[(unsigned char)str[33]];
+      case 33:
+        hval += asso_values[(unsigned char)str[32]];
+      case 32:
+        hval += asso_values[(unsigned char)str[31]];
+      case 31:
+        hval += asso_values[(unsigned char)str[30]];
+      case 30:
+        hval += asso_values[(unsigned char)str[29]];
+      case 29:
+        hval += asso_values[(unsigned char)str[28]];
+      case 28:
+        hval += asso_values[(unsigned char)str[27]];
+      case 27:
+        hval += asso_values[(unsigned char)str[26]];
+      case 26:
+        hval += asso_values[(unsigned char)str[25]];
+      case 25:
+        hval += asso_values[(unsigned char)str[24]];
+      case 24:
+        hval += asso_values[(unsigned char)str[23]];
+      case 23:
+        hval += asso_values[(unsigned char)str[22]];
+      case 22:
+        hval += asso_values[(unsigned char)str[21]];
+      case 21:
+        hval += asso_values[(unsigned char)str[20]];
+      case 20:
+        hval += asso_values[(unsigned char)str[19]];
+      case 19:
+        hval += asso_values[(unsigned char)str[18]];
+      case 18:
+        hval += asso_values[(unsigned char)str[17]];
+      case 17:
+        hval += asso_values[(unsigned char)str[16]];
+      case 16:
+        hval += asso_values[(unsigned char)str[15]];
+      case 15:
+        hval += asso_values[(unsigned char)str[14]];
+      case 14:
+        hval += asso_values[(unsigned char)str[13]];
+      case 13:
+        hval += asso_values[(unsigned char)str[12]];
+      case 12:
+        hval += asso_values[(unsigned char)str[11]];
+      case 11:
+        hval += asso_values[(unsigned char)str[10]];
+      case 10:
+        hval += asso_values[(unsigned char)str[9]];
+      case 9:
+        hval += asso_values[(unsigned char)str[8]];
+      case 8:
+        hval += asso_values[(unsigned char)str[7]];
+      case 7:
+        hval += asso_values[(unsigned char)str[6]];
+      case 6:
+        hval += asso_values[(unsigned char)str[5]];
+      case 5:
+        hval += asso_values[(unsigned char)str[4]];
+      case 4:
+        hval += asso_values[(unsigned char)str[3]];
+      case 3:
+        hval += asso_values[(unsigned char)str[2]];
+      case 2:
+        hval += asso_values[(unsigned char)str[1]];
+      case 1:
+        hval += asso_values[(unsigned char)str[0]];
+        break;
+    }
+  return hval;
+}
+
+const struct PubIDInfo *
+Perfect_Hash::findDoctypeEntry (register const char *str, register unsigned int len)
+{
+  enum
+    {
+      TOTAL_KEYWORDS = 76,
+      MIN_WORD_LENGTH = 4,
+      MAX_WORD_LENGTH = 80,
+      MIN_HASH_VALUE = 4,
+      MAX_HASH_VALUE = 569
+    };
+
+  static const struct PubIDInfo wordlist[] =
+    {
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"html", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 3//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 3.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html 3.0//en//", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//webtechs//dtd mozilla html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 3.2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 3.2 final//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//webtechs//dtd mozilla html 2.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd w3 html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.0 strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html strict//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//w3c//dtd html 3.2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.1e//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd html 3.2 final//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//o'reilly and associates//dtd html 2.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3o//dtd w3 html 3.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3o//dtd w3 html 3.0//en//", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html level 0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html level 3//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//w3c//dtd html 3.2 draft//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//w3c//dtd html 3.2s draft//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html level 0//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html level 3//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//netscape comm. corp.//dtd html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//w3c//dtd html 4.0 frameset//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks},
+      {"-/w3c/dtd html 4.0 transitional/en", PubIDInfo::eQuirks, PubIDInfo::eQuirks},
+      {"-//sq//dtd html 2.0 hotmetal + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//w3o//dtd w3 html strict 3.0//en//", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//w3c//dtd html 4.0 transitional//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks},
+      {"-//spyglass//dtd html 2.0 extended//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//as//dtd html 3.0 aswedit + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict level 0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.0 level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html level 2//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict level 3//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict level 0//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.0 level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html level 1//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict level 3//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//o'reilly and associates//dtd html extended 1.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//netscape comm. corp.//dtd strict html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd html 4.01 frameset//en", PubIDInfo::eQuirks, PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//metrius//dtd metrius presentational//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks},
+      {"-//w3c//dtd html 4.01 transitional//en", PubIDInfo::eQuirks, PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html strict level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd xhtml 1.0 frameset//en", PubIDInfo::eAlmostStandards, PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.0 strict level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html strict level 2//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd xhtml 1.0 transitional//en", PubIDInfo::eAlmostStandards, PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd html 3 1995-03-24//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//ietf//dtd html 2.0 strict level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"-//ietf//dtd html strict level 1//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//sun microsystems corp.//dtd hotjava html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//advasoft ltd//dtd html 3.0 aswedit + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//sun microsystems corp.//dtd hotjava strict html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//o'reilly and associates//dtd html extended relaxed 1.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//microsoft//dtd internet explorer 3.0 html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//microsoft//dtd internet explorer 3.0 tables//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//microsoft//dtd internet explorer 2.0 html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//microsoft//dtd internet explorer 2.0 tables//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd html experimental 970421//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//w3c//dtd html experimental 19960712//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//microsoft//dtd internet explorer 3.0 html strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//microsoft//dtd internet explorer 2.0 html strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"",PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards},
+      {"+//silmaril//dtd html pro v0r11 19970101//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3}
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register const char *s = wordlist[key].name;
+
+          if (*str == *s && !strcmp (str + 1, s + 1))
+            return &wordlist[key];
+        }
+    }
+  return 0;
+}
diff --git a/WebCore/khtml/html/doctypes.gperf b/WebCore/khtml/html/doctypes.gperf
new file mode 100644
index 0000000..779f8d0
--- /dev/null
+++ b/WebCore/khtml/html/doctypes.gperf
@@ -0,0 +1,88 @@
+struct PubIDInfo {
+    enum eMode { 
+        eQuirks,         
+        eQuirks3,       
+        eAlmostStandards
+    };
+
+    const char* name;
+    eMode mode_if_no_sysid;
+    eMode mode_if_sysid;
+}
+%%
+"+//silmaril//dtd html pro v0r11 19970101//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//advasoft ltd//dtd html 3.0 aswedit + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//as//dtd html 3.0 aswedit + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.0 level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.0 level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.0 strict level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.0 strict level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.0 strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 2.1e//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 3.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 3.0//en//", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 3.2 final//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 3.2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html 3//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 0//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 1//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 2//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 3//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html level 3//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 0//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 1//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 1//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 2//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 3//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict level 3//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html strict//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html//en//2.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//ietf//dtd html//en//3.0", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//metrius//dtd metrius presentational//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks
+"-//microsoft//dtd internet explorer 2.0 html strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//microsoft//dtd internet explorer 2.0 html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//microsoft//dtd internet explorer 2.0 tables//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//microsoft//dtd internet explorer 3.0 html strict//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//microsoft//dtd internet explorer 3.0 html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//microsoft//dtd internet explorer 3.0 tables//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//netscape comm. corp.//dtd html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//netscape comm. corp.//dtd strict html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//o'reilly and associates//dtd html 2.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//o'reilly and associates//dtd html extended 1.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//o'reilly and associates//dtd html extended relaxed 1.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks
+"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks
+"-//spyglass//dtd html 2.0 extended//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//sq//dtd html 2.0 hotmetal + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//sun microsystems corp.//dtd hotjava html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//sun microsystems corp.//dtd hotjava strict html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html 3 1995-03-24//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html 3.2 draft//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html 3.2 final//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html 3.2//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html 3.2s draft//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html 4.0 frameset//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks
+"-//w3c//dtd html 4.0 transitional//en", PubIDInfo::eQuirks, PubIDInfo::eQuirks
+"-//w3c//dtd html 4.01 frameset//en", PubIDInfo::eQuirks, PubIDInfo::eAlmostStandards
+"-//w3c//dtd html 4.01 transitional//en", PubIDInfo::eQuirks, PubIDInfo::eAlmostStandards
+"-//w3c//dtd html experimental 19960712//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd html experimental 970421//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd w3 html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3c//dtd xhtml 1.0 frameset//en", PubIDInfo::eAlmostStandards, PubIDInfo::eAlmostStandards
+"-//w3c//dtd xhtml 1.0 transitional//en", PubIDInfo::eAlmostStandards, PubIDInfo::eAlmostStandards
+"-//w3o//dtd w3 html 3.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3o//dtd w3 html 3.0//en//", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//w3o//dtd w3 html strict 3.0//en//", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//webtechs//dtd mozilla html 2.0//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-//webtechs//dtd mozilla html//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
+"-/w3c/dtd html 4.0 transitional/en", PubIDInfo::eQuirks, PubIDInfo::eQuirks
+"html", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
diff --git a/WebCore/khtml/html/html_documentimpl.cpp b/WebCore/khtml/html/html_documentimpl.cpp
index 74be914..d913cae 100644
--- a/WebCore/khtml/html/html_documentimpl.cpp
+++ b/WebCore/khtml/html/html_documentimpl.cpp
@@ -43,6 +43,7 @@
 
 #include "khtml_factory.h"
 #include "rendering/render_object.h"
+#include "doctypes.cpp"
 
 #include <dcopclient.h>
 #include <kapplication.h>
@@ -289,20 +290,6 @@ HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url)
         return 0;
 }
 
-static bool isTransitional(const QString &spec, int start)
-{
-    if((spec.find("TRANSITIONAL", start, false ) != -1 ) ||
-       (spec.find("LOOSE", start, false ) != -1 ) ||
-       (spec.find("FRAMESET", start, false ) != -1 ) ||
-       (spec.find("LATIN1", start, false ) != -1 ) ||
-       (spec.find("SYMBOLS", start, false ) != -1 ) ||
-       (spec.find("SPECIAL", start, false ) != -1 ) ) {
-        //kdDebug() << "isTransitional" << endl;
-        return true;
-    }
-    return false;
-}
-
 void HTMLDocumentImpl::close()
 {
     // First fire the onload.
@@ -382,97 +369,227 @@ bool HTMLDocumentImpl::haveNamedImageOrForm(const QString &name)
     return namedImageAndFormCounts.find(name) != NULL;
 }
 
-void HTMLDocumentImpl::determineParseMode( const QString &str )
+
+
+const int PARSEMODE_HAVE_DOCTYPE	=	(1<<0);
+const int PARSEMODE_HAVE_PUBLIC_ID	=	(1<<1);
+const int PARSEMODE_HAVE_SYSTEM_ID	=	(1<<2);
+const int PARSEMODE_HAVE_INTERNAL	=	(1<<3);
+
+static int parseDocTypePart(const QString& buffer, int index)
 {
-    //kdDebug() << "DocumentImpl::determineParseMode str=" << str<< endl;
-    // determines the parse mode for HTML
-    // quite some hints here are inspired by the mozilla code.
-
-    // default parsing mode is Loose
-    pMode = Compat;
-    hMode = Html3;
-
-    ParseMode systemId = Unknown;
-    ParseMode publicId = Unknown;
-
-    int pos = 0;
-    int doctype = str.find("!doctype", 0, false);
-    if( doctype > 2 ) {
-        pos = doctype - 2;
-        // Store doctype name
-        int start = doctype + 9;
-        while ( start < (int)str.length() && str[start].isSpace() )
-            start++;
-        int espace = str.find(' ',start);
-        QString name = str.mid(start,espace-start);
-        //kdDebug() << "DocumentImpl::determineParseMode setName: " << name << endl;
-        m_doctype->setName( name );
+    while (true) {
+        QChar ch = buffer[index];
+        if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')
+            ++index;
+        else if (ch == '-') {
+            int tmpIndex;
+            if (buffer[index+1] == '-' &&
+                ((tmpIndex=buffer.findRev("--", index+2) != -1)))
+                index = tmpIndex+2;
+            else
+                return index;
+        }
+        else
+            return index;
     }
+}
+
+static bool containsString(const char* str, const QString& buffer, int offset)
+{
+    QString startString(str);
+    if (offset + startString.length() > buffer.length())
+        return false;
+    
+    QString bufferString = buffer.mid(offset, startString.length()).lower();
+    QString lowerStart = startString.lower();
+
+    return bufferString.startsWith(lowerStart);
+}
 
-    // get the first tag (or the doctype tag)
-    int start = str.find('<', pos);
-    int stop = str.find('>', pos);
-    if( start > -1 && stop > start ) {
-        QString spec = str.mid( start + 1, stop - start - 1 );
-        //kdDebug() << "DocumentImpl::determineParseMode dtd=" << spec<< endl;
-        start = 0;
-        int quote = -1;
-        if( doctype != -1 ) {
-            while( (quote = spec.find( "\"", start )) != -1 ) {
-                int quote2 = spec.find( "\"", quote+1 );
-                if(quote2 < 0) quote2 = spec.length();
-                QString val = spec.mid( quote+1, quote2 - quote-1 );
-                //kdDebug() << "DocumentImpl::determineParseMode val = " << val << endl;
-                // find system id
-                pos = val.find("http://www.w3.org/tr/", 0, false);
-                if ( pos != -1 ) {
-                    // loose or strict dtd?
-                    if ( val.find("strict.dtd", pos, false) != -1 )
-                        systemId = Strict;
-                    else if (isTransitional(val, pos))
-                        systemId = Transitional;
-                }
-
-                // find public id
-                pos = val.find("//dtd", 0, false );
-                if ( pos != -1 ) {
-                    if( val.find( "xhtml", pos+6, false ) != -1 ) {
-                        hMode = XHtml;
-                        publicId = isTransitional(val, pos) ? Transitional : Strict;
-                    } else if ( val.find( "15445:1999", pos+6 ) != -1 ) {
-                        hMode = Html4;
-                        publicId = Strict;
-                    } else {
-                        int tagPos = val.find( "html", pos+6, false );
-                        if( tagPos == -1 )
-                            tagPos = val.find( "hypertext markup", pos+6, false );
-                        if ( tagPos != -1 ) {
-                            tagPos = val.find(QRegExp("[0-9]"), tagPos );
-                            int version = val.mid( tagPos, 1 ).toInt();
-                            //kdDebug() << "DocumentImpl::determineParseMode tagPos = " << tagPos << " version=" << version << endl;
-                            if( version > 3 ) {
-                                hMode = Html4;
-                                publicId = isTransitional( val, tagPos ) ? Transitional : Strict;
-                            }
-                        }
-                    }
-                }
-                start = quote2 + 1;
+static bool parseDocTypeDeclaration(const QString& buffer,
+                                    int* resultFlags,
+                                    QString& publicID,
+                                    QString& systemID)
+{
+    bool haveDocType = false;
+    *resultFlags = 0;
+
+    // Skip through any comments and processing instructions.
+    int index = 0;
+    do {
+        index = buffer.find('<', index);
+        if (index == -1) break;
+        QChar nextChar = buffer[index+1];
+        if (nextChar == '!') {
+            if (containsString("doctype", buffer, index+2)) {
+                haveDocType = true;
+                index += 9; // Skip "<!DOCTYPE"
+                break;
             }
+            index = parseDocTypePart(buffer,index);
+            index = buffer.find('>', index);
         }
+        else if (nextChar == '?')
+            index = buffer.find('>', index);
+        else
+            break;
+    } while (index != -1);
 
-        // e.g.,<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> should be strict.
-        // Just because it's HTML4 doesn't mean it should be treated as Compat. -dwh
-        if( systemId == publicId || systemId == Unknown )
-            pMode = publicId;
-        else if ( publicId == Transitional && systemId == Strict ) {
-            pMode = hMode == Html3 ? Compat : Strict;
-        } else
-            pMode = Compat;
+    if (!haveDocType)
+        return true;
+    *resultFlags |= PARSEMODE_HAVE_DOCTYPE;
 
-        if ( hMode == XHtml )
+    index = parseDocTypePart(buffer, index);
+    if (!containsString("html", buffer, index))
+        return false;
+    
+    index = parseDocTypePart(buffer, index+4);
+    bool hasPublic = containsString("public", buffer, index);
+    if (hasPublic) {
+        index = parseDocTypePart(buffer, index+6);
+
+        // We've read <!DOCTYPE HTML PUBLIC (not case sensitive).
+        // Now we find the beginning and end of the public identifers
+        // and system identifiers (assuming they're even present).
+        QChar theChar = buffer[index];
+        if (theChar != '\"' && theChar != '\'')
+            return false;
+        
+        // |start| is the first character (after the quote) and |end|
+        // is the final quote, so there are |end|-|start| characters.
+        int publicIDStart = index+1;
+        int publicIDEnd = buffer.find(theChar, publicIDStart);
+        if (publicIDEnd == -1)
+            return false;
+        index = parseDocTypePart(buffer, publicIDEnd+1);
+        QChar next = buffer[index];
+        if (next == '>') {
+            // Public identifier present, but no system identifier.
+            // Do nothing.  Note that this is the most common
+            // case.
+        }
+        else if (next == '\"' || next == '\'') {
+            // We have a system identifier.
+            *resultFlags |= PARSEMODE_HAVE_SYSTEM_ID;
+            int systemIDStart = index+1;
+            int systemIDEnd = buffer.find(next, systemIDStart);
+            if (systemIDEnd == -1)
+                return false;
+            systemID = buffer.mid(systemIDStart, systemIDEnd - systemIDStart);
+        }
+        else if (next == '[') {
+            // We found an internal subset.
+            *resultFlags |= PARSEMODE_HAVE_INTERNAL;
+        }
+        else
+            return false; // Something's wrong.
+
+        // We need to trim whitespace off the public identifier.
+        publicID = buffer.mid(publicIDStart, publicIDEnd - publicIDStart);
+        publicID = publicID.stripWhiteSpace();
+        *resultFlags |= PARSEMODE_HAVE_PUBLIC_ID;
+    } else {
+        if (containsString("system", buffer, index)) {
+            // Doctype has a system ID but no public ID
+            *resultFlags |= PARSEMODE_HAVE_SYSTEM_ID;
+            index = parseDocTypePart(buffer, index+6);
+            QChar next = buffer[index];
+            if (next != '\"' && next != '\'')
+                return false;
+            int systemIDStart = index+1;
+            int systemIDEnd = buffer.find(next, systemIDStart);
+            if (systemIDEnd == -1)
+                return false;
+            systemID = buffer.mid(systemIDStart, systemIDEnd - systemIDStart);
+            index = parseDocTypePart(buffer, systemIDEnd+1);
+        }
+
+        QChar nextChar = buffer[index];
+        if (nextChar == '[')
+            *resultFlags |= PARSEMODE_HAVE_INTERNAL;
+        else if (nextChar != '>')
+            return false;
+    }
+
+    return true;
+}
+
+void HTMLDocumentImpl::determineParseMode( const QString &str )
+{
+    //kdDebug() << "DocumentImpl::determineParseMode str=" << str<< endl;
+
+    // This code more or less mimics Mozilla's implementation (specifically the
+    // doctype parsing implemented by David Baron in Mozilla's nsParser.cpp).
+    //
+    // There are three possible parse modes:
+    // COMPAT - quirks mode emulates WinIE
+    // and NS4.  CSS parsing is also relaxed in this mode, e.g., unit types can
+    // be omitted from numbers.
+    // ALMOST STRICT - This mode is identical to strict mode
+    // except for its treatment of line-height in the inline box model.  For
+    // now (until the inline box model is re-written), this mode is identical
+    // to STANDARDS mode.
+    // STRICT - no quirks apply.  Web pages will obey the specifications to
+    // the letter.
+
+    QString systemID, publicID;
+    int resultFlags = 0;
+    if (parseDocTypeDeclaration(str, &resultFlags, publicID, systemID)) {
+        m_doctype->setName("HTML");
+        if (!(resultFlags & PARSEMODE_HAVE_DOCTYPE)) {
+            // No doctype found at all.  Default to quirks mode and Html4.
+            pMode = Compat;
+            hMode = Html4;
+        }
+        else if ((resultFlags & PARSEMODE_HAVE_INTERNAL) ||
+                 !(resultFlags & PARSEMODE_HAVE_PUBLIC_ID)) {
+            // Internal subsets always denote full standards, as does
+            // a doctype without a public ID.
             pMode = Strict;
+            hMode = Html4;
+        }
+        else {
+            // We have to check a list of public IDs to see what we
+            // should do.
+            const char* pubIDStr = publicID.lower().latin1();
+
+            // Look up the entry in our gperf-generated table.
+            const PubIDInfo* doctypeEntry = Perfect_Hash::findDoctypeEntry(pubIDStr, publicID.length());
+            if (!doctypeEntry) {
+                // The DOCTYPE is not in the list.  Assume strict mode.
+                pMode = Strict;
+                hMode = Html4;
+                return;
+            }
+
+            switch ((resultFlags & PARSEMODE_HAVE_SYSTEM_ID) ?
+                    doctypeEntry->mode_if_sysid :
+                    doctypeEntry->mode_if_no_sysid)
+            {
+                case PubIDInfo::eQuirks3:
+                    pMode = Compat;
+                    hMode = Html3;
+                    break;
+                case PubIDInfo::eQuirks:
+                    pMode = Compat;
+                    hMode = Html4;
+                    break;
+                case PubIDInfo::eAlmostStandards:
+                    pMode = AlmostStrict;
+                    hMode = Html4;
+                    break;
+                 default:
+                    assert(false);
+            }
+        }   
     }
+    else {
+        // Malformed doctype implies quirks mode.
+        pMode = Compat;
+        hMode = Html3;
+    }
+  
 //     kdDebug() << "DocumentImpl::determineParseMode: publicId =" << publicId << " systemId = " << systemId << endl;
 //     kdDebug() << "DocumentImpl::determineParseMode: htmlMode = " << hMode<< endl;
 //     if( pMode == Strict )
@@ -480,7 +597,8 @@ void HTMLDocumentImpl::determineParseMode( const QString &str )
 //     else if (pMode == Compat )
 //         kdDebug(6020) << " using compatibility parseMode" << endl;
 //     else
-//         kdDebug(6020) << " using transitional parseMode" << endl;
+//         kdDebug(6020) << " using almost strict parseMode" << endl;
+ 
 }
 
 #include "html_documentimpl.moc"
diff --git a/WebCore/khtml/html/html_headimpl.cpp b/WebCore/khtml/html/html_headimpl.cpp
index cc373e0..42d5bc4 100644
--- a/WebCore/khtml/html/html_headimpl.cpp
+++ b/WebCore/khtml/html/html_headimpl.cpp
@@ -255,9 +255,9 @@ void HTMLLinkElementImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DO
     if (m_sheet)
         m_sheet->deref();
     m_sheet = new CSSStyleSheetImpl(this, url);
-    kdDebug( 6030 ) << "style sheet parse mode strict = " << ( getDocument()->parseMode() == DocumentImpl::Strict ) << endl;
+    kdDebug( 6030 ) << "style sheet parse mode strict = " << ( !getDocument()->inQuirksMode() ) << endl;
     m_sheet->ref();
-    m_sheet->parseString( sheetStr, getDocument()->parseMode() == DocumentImpl::Strict );
+    m_sheet->parseString( sheetStr, !getDocument()->inQuirksMode() );
 
     MediaListImpl *media = new MediaListImpl( m_sheet, m_media );
     m_sheet->setMedia( media );
@@ -418,7 +418,7 @@ void HTMLStyleElementImpl::childrenChanged()
         m_loading = true;
         m_sheet = new CSSStyleSheetImpl(this);
         m_sheet->ref();
-        m_sheet->parseString( text, (getDocument()->parseMode() == DocumentImpl::Strict) );
+        m_sheet->parseString( text, !getDocument()->inQuirksMode() );
         m_loading = false;
     }
 
diff --git a/WebCore/khtml/html/html_tableimpl.cpp b/WebCore/khtml/html/html_tableimpl.cpp
index 71e714c..52db6d2 100644
--- a/WebCore/khtml/html/html_tableimpl.cpp
+++ b/WebCore/khtml/html/html_tableimpl.cpp
@@ -499,7 +499,7 @@ void HTMLTableElementImpl::attach()
         // reset font color and sizes here, if we don't have strict parse mode.
         // this is 90% compatible to ie and mozilla, and the by way easiest solution...
         // only difference to 100% correct is that in strict mode <font> elements are propagated into tables.
-        if ( getDocument()->parseMode() != DocumentImpl::Strict ) {
+        if ( getDocument()->inQuirksMode() ) {
             addCSSProperty( CSS_PROP_FONT_SIZE, CSS_VAL_MEDIUM );
             addCSSProperty( CSS_PROP_COLOR, getDocument()->textColor() );
             addCSSProperty( CSS_PROP_FONT_FAMILY, "konq_body" );
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index d9b95c7..1162b0f 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -216,7 +216,7 @@ void KHTMLParser::parseToken(Token *t)
 
     // holy shit. apparently some sites use </br> instead of <br>
     // be compatible with IE and NS
-    if(t->id == ID_BR+ID_CLOSE_TAG && document->document()->parseMode() != DocumentImpl::Strict)
+    if(t->id == ID_BR+ID_CLOSE_TAG && document->document()->inQuirksMode())
         t->id -= ID_CLOSE_TAG;
 
     if(t->id > ID_CLOSE_TAG)
diff --git a/WebCore/khtml/html/htmltokenizer.cpp b/WebCore/khtml/html/htmltokenizer.cpp
index f76cfda..fa36cc4 100644
--- a/WebCore/khtml/html/htmltokenizer.cpp
+++ b/WebCore/khtml/html/htmltokenizer.cpp
@@ -873,7 +873,7 @@ void HTMLTokenizer::parseTag(DOMStringIt &src)
                         // Fix bug 34302 at kde.bugs.org.  Go ahead and treat
                         // <!--> as a valid comment, since both mozilla and IE on windows
                         // can handle this case.  Only do this in quirks mode. -dwh
-                        if (*src == '>' && parser->doc()->parseMode() != DocumentImpl::Strict) {
+                        if (*src == '>' && parser->doc()->inQuirksMode()) {
                           comment = false;
                           ++src;
                           cBuffer[cBufferPos++] = src->cell();
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index ea6f287..3df105b 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -1859,7 +1859,7 @@ bool KHTMLPart::gotoAnchor( const QString &name )
   HTMLCollectionImpl *anchors =
       new HTMLCollectionImpl( d->m_doc, HTMLCollectionImpl::DOC_ANCHORS);
   anchors->ref();
-  NodeImpl *n = anchors->namedItem(name, d->m_doc->parseMode() == DocumentImpl::Strict);
+  NodeImpl *n = anchors->namedItem(name, !d->m_doc->inQuirksMode());
   anchors->deref();
 
   if(!n) {
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index cc05873..7f380c0 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -474,7 +474,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
     bool bottomChildQuirk = false;
     bool determinedTopQuirk = false;
     
-    bool strictMode = isAnonymousBox() ? true : (element()->getDocument()->parseMode() == DocumentImpl::Strict);
+    bool strictMode = isAnonymousBox() ? true : (!element()->getDocument()->inQuirksMode());
      
     //kdDebug() << "RenderFlow::layoutBlockChildren " << prevMargin << endl;
 
diff --git a/WebCore/khtml/rendering/render_list.cpp b/WebCore/khtml/rendering/render_list.cpp
index e9ca99a..001dbc7 100644
--- a/WebCore/khtml/rendering/render_list.cpp
+++ b/WebCore/khtml/rendering/render_list.cpp
@@ -201,7 +201,7 @@ static RenderObject* getParentOfFirstLineBox(RenderObject* curr, RenderObject* m
             break;
         
         if (currChild->element() && 
-            (currChild->element()->getDocument()->parseMode() != DocumentImpl::Strict) &&
+            (currChild->element()->getDocument()->inQuirksMode()) &&
             (currChild->element()->id() == ID_UL || currChild->element()->id() == ID_OL))
             break;
             
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 9458b4b..6c25c2b 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -71,11 +71,11 @@ RenderObject *RenderObject::createObject(DOM::NodeImpl* node,  RenderStyle* styl
         // CSS2 anonymous table render object construction, but until then, this will have
         // to suffice. -dwh
         if (style->display() == BLOCK && node->id() == ID_TD &&
-            node->getDocument()->parseMode() != DocumentImpl::Strict)
+            node->getDocument()->inQuirksMode())
             o = new (arena) RenderTableCell(node);
         // In quirks mode if <table> has a display of block, make a table. If it has 
         // a display of inline, make an inline-table.
-        else if (node->id() == ID_TABLE && node->getDocument()->parseMode() != DocumentImpl::Strict)
+        else if (node->id() == ID_TABLE && node->getDocument()->inQuirksMode())
             o = new (arena) RenderTable(node);
         else
             o = new (arena) RenderFlow(node);
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index c061e43..6ecd573 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1188,8 +1188,10 @@ CSSStyleSheetImpl* DocumentImpl::elementSheet()
 
 void DocumentImpl::determineParseMode( const QString &/*str*/ )
 {
-    // For xML documents, use string parse mode
+    // For XML documents use strict parse mode.  HTML docs will override this method to
+    // determine their parse mode.
     pMode = Strict;
+    hMode = XHtml;
     kdDebug(6020) << " using strict parseMode" << endl;
 }
 
diff --git a/WebCore/khtml/xml/dom_docimpl.h b/WebCore/khtml/xml/dom_docimpl.h
index 7d2db0b..d083412 100644
--- a/WebCore/khtml/xml/dom_docimpl.h
+++ b/WebCore/khtml/xml/dom_docimpl.h
@@ -276,21 +276,23 @@ public:
     void setPaintDevice( QPaintDevice *dev );
 
     enum HTMLMode {
-        Html3 = 0,
-        Html4 = 1,
-        XHtml = 2
+        Html3,
+        Html4,
+        XHtml
     };
 
     enum ParseMode {
-        Unknown,
         Compat,
-        Transitional,
+        AlmostStrict,
         Strict
     };
+    
     virtual void determineParseMode( const QString &str );
     void setParseMode( ParseMode m ) { pMode = m; }
     ParseMode parseMode() const { return pMode; }
 
+    bool inQuirksMode() { return pMode == Compat; }
+    
     void setHTMLMode( HTMLMode m ) { hMode = m; }
     HTMLMode htmlMode() const { return hMode; }
 
diff --git a/WebCore/khtml/xml/dom_elementimpl.cpp b/WebCore/khtml/xml/dom_elementimpl.cpp
index 4a95c63..19a30e8 100644
--- a/WebCore/khtml/xml/dom_elementimpl.cpp
+++ b/WebCore/khtml/xml/dom_elementimpl.cpp
@@ -432,7 +432,7 @@ void ElementImpl::createDecl( )
     m_styleDecls->ref();
     m_styleDecls->setParent(getDocument()->elementSheet());
     m_styleDecls->setNode(this);
-    m_styleDecls->setStrictParsing( getDocument()->parseMode() == DocumentImpl::Strict );
+    m_styleDecls->setStrictParsing( !getDocument()->inQuirksMode() );
 }
 
 void ElementImpl::dispatchAttrRemovalEvent(AttributeImpl *attr)
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 0b69561..393f79b 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -978,6 +978,28 @@ int QString::compare( const QString& s ) const
     return ucstrcmp(*this,s);
 }
 
+int QString::compare(const char *chs) const
+{
+    if (!chs)
+        return isEmpty() ? 0 : 1;
+    KWQStringData *d = dataHandle[0];
+    if (d->_isAsciiValid)
+        return strcmp(ascii(), chs);
+    const QChar *s = unicode();
+    uint len = d->_length;
+    for (uint i = 0; i != len; ++i) {
+        char c2 = chs[i];
+        if (!c2)
+            return 1;
+        QChar c1 = s[i];
+        if (c1 < c2)
+            return -1;
+        if (c1 > c2)
+            return 1;
+    }
+    return chs[len] ? -1 : 0;
+}
+
 bool QString::startsWith( const QString& s ) const
 {
     if (dataHandle[0]->_isAsciiValid){

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list