19lxb_html_tree_insertion_mode_initial_doctype_public_is[] =
21 {
"-//W3O//DTD W3 HTML Strict 3.0//EN//", 36},
22 {
"-/W3C/DTD HTML 4.0 Transitional/EN", 34},
27lxb_html_tree_insertion_mode_initial_doctype_system_is[] =
29 {
"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", 58}
33lxb_html_tree_insertion_mode_initial_doctype_public_start[] =
35 {
"+//Silmaril//dtd html Pro v0r11 19970101//", 42},
36 {
"-//AS//DTD HTML 3.0 asWedit + extensions//", 42},
37 {
"-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//", 52},
38 {
"-//IETF//DTD HTML 2.0 Level 1//", 31},
39 {
"-//IETF//DTD HTML 2.0 Level 2//", 31},
40 {
"-//IETF//DTD HTML 2.0 Strict Level 1//", 38},
41 {
"-//IETF//DTD HTML 2.0 Strict Level 2//", 38},
42 {
"-//IETF//DTD HTML 2.0 Strict//", 30},
43 {
"-//IETF//DTD HTML 2.0//", 23},
44 {
"-//IETF//DTD HTML 2.1E//", 24},
45 {
"-//IETF//DTD HTML 3.0//", 23},
46 {
"-//IETF//DTD HTML 3.2 Final//", 29},
47 {
"-//IETF//DTD HTML 3.2//", 23},
48 {
"-//IETF//DTD HTML 3//", 21},
49 {
"-//IETF//DTD HTML Level 0//", 27},
50 {
"-//IETF//DTD HTML Level 1//", 27},
51 {
"-//IETF//DTD HTML Level 2//", 27},
52 {
"-//IETF//DTD HTML Level 3//", 27},
53 {
"-//IETF//DTD HTML Strict Level 0//", 34},
54 {
"-//IETF//DTD HTML Strict Level 1//", 34},
55 {
"-//IETF//DTD HTML Strict Level 2//", 34},
56 {
"-//IETF//DTD HTML Strict Level 3//", 34},
57 {
"-//IETF//DTD HTML Strict//", 26},
58 {
"-//IETF//DTD HTML//", 19},
59 {
"-//Metrius//DTD Metrius Presentational//", 40},
60 {
"-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//", 53},
61 {
"-//Microsoft//DTD Internet Explorer 2.0 HTML//", 46},
62 {
"-//Microsoft//DTD Internet Explorer 2.0 Tables//", 48},
63 {
"-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//", 53},
64 {
"-//Microsoft//DTD Internet Explorer 3.0 HTML//", 46},
65 {
"-//Microsoft//DTD Internet Explorer 3.0 Tables//", 48},
66 {
"-//Netscape Comm. Corp.//DTD HTML//", 35},
67 {
"-//Netscape Comm. Corp.//DTD Strict HTML//", 42},
68 {
"-//O'Reilly and Associates//DTD HTML 2.0//", 42},
69 {
"-//O'Reilly and Associates//DTD HTML Extended 1.0//", 51},
70 {
"-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//", 59},
71 {
"-//SQ//DTD HTML 2.0 HoTMetaL + extensions//", 43},
72 {
"-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//", 78},
73 {
"-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//", 69},
74 {
"-//Spyglass//DTD HTML 2.0 Extended//", 36},
75 {
"-//Sun Microsystems Corp.//DTD HotJava HTML//", 45},
76 {
"-//Sun Microsystems Corp.//DTD HotJava Strict HTML//", 52},
77 {
"-//W3C//DTD HTML 3 1995-03-24//", 31},
78 {
"-//W3C//DTD HTML 3.2 Draft//", 28},
79 {
"-//W3C//DTD HTML 3.2 Final//", 28},
80 {
"-//W3C//DTD HTML 3.2//", 22},
81 {
"-//W3C//DTD HTML 3.2S Draft//", 29},
82 {
"-//W3C//DTD HTML 4.0 Frameset//", 31},
83 {
"-//W3C//DTD HTML 4.0 Transitional//", 35},
84 {
"-//W3C//DTD HTML Experimental 19960712//", 40},
85 {
"-//W3C//DTD HTML Experimental 970421//", 38},
86 {
"-//W3C//DTD W3 HTML//", 21},
87 {
"-//W3O//DTD W3 HTML 3.0//", 25},
88 {
"-//WebTechs//DTD Mozilla HTML 2.0//", 35},
89 {
"-//WebTechs//DTD Mozilla HTML//", 31}
93lxb_html_tree_insertion_mode_initial_doctype_sys_pub_start[] =
95 {
"-//W3C//DTD HTML 4.01 Frameset//", 32},
96 {
"-//W3C//DTD HTML 4.01 Transitional//", 36}
100lxb_html_tree_insertion_mode_initial_doctype_lim_pub_start[] =
102 {
"-//W3C//DTD XHTML 1.0 Frameset//", 32},
103 {
"-//W3C//DTD XHTML 1.0 Transitional//", 36}
112lxb_html_tree_insertion_mode_initial_doctype_ckeck(
lxb_html_tree_t *tree,
117lxb_html_tree_insertion_mode_initial_doctype_ckeck_public(
121lxb_html_tree_insertion_mode_initial_doctype_ckeck_system(
125lxb_html_tree_insertion_mode_initial_doctype_ckeck_pubsys(
129lxb_html_tree_insertion_mode_initial_doctype_check_limq(
143 if (comment ==
NULL) {
153 return lxb_html_tree_insertion_mode_initial_doctype(tree, token);
193 if (doc_type ==
NULL) {
205 &&
strncmp(
"about:legacy-compat",
213 lxb_html_tree_insertion_mode_initial_doctype_ckeck(tree, doc_type,
225lxb_html_tree_insertion_mode_initial_doctype_ckeck(
lxb_html_tree_t *tree,
240 if (is_html ==
false) {
246 lxb_html_tree_insertion_mode_initial_doctype_ckeck_public(doc_type);
255 lxb_html_tree_insertion_mode_initial_doctype_ckeck_system(doc_type);
264 lxb_html_tree_insertion_mode_initial_doctype_ckeck_pubsys(doc_type);
273 lxb_html_tree_insertion_mode_initial_doctype_check_limq(doc_type);
289lxb_html_tree_insertion_mode_initial_doctype_ckeck_public(
296 size =
sizeof(lxb_html_tree_insertion_mode_initial_doctype_public_is)
299 for (i = 0; i <
size; i++) {
300 str = &lxb_html_tree_insertion_mode_initial_doctype_public_is[i];
311 size =
sizeof(lxb_html_tree_insertion_mode_initial_doctype_public_start)
314 for (i = 0; i <
size; i++) {
315 str = &lxb_html_tree_insertion_mode_initial_doctype_public_start[i];
329lxb_html_tree_insertion_mode_initial_doctype_ckeck_system(
336 size =
sizeof(lxb_html_tree_insertion_mode_initial_doctype_system_is)
339 for (
size_t i = 0; i <
size; i++) {
340 str = &lxb_html_tree_insertion_mode_initial_doctype_system_is[i];
354lxb_html_tree_insertion_mode_initial_doctype_ckeck_pubsys(
361 size =
sizeof(lxb_html_tree_insertion_mode_initial_doctype_sys_pub_start)
364 for (
size_t i = 0; i <
size; i++) {
365 str = &lxb_html_tree_insertion_mode_initial_doctype_sys_pub_start[i];
379lxb_html_tree_insertion_mode_initial_doctype_check_limq(
388 lxb_html_tree_insertion_mode_initial_doctype_ckeck_pubsys(doc_type);
396 size =
sizeof(lxb_html_tree_insertion_mode_initial_doctype_lim_pub_start)
399 for (
size_t i = 0; i <
size; i++) {
400 str = &lxb_html_tree_insertion_mode_initial_doctype_lim_pub_start[i];
@ LXB_STATUS_ERROR_MEMORY_ALLOCATION
struct lxb_dom_document lxb_dom_document_t
struct lxb_dom_document_type lxb_dom_document_type_t
#define lxb_dom_interface_node(obj)
struct lxb_dom_comment lxb_dom_comment_t
@ LXB_DOM_DOCUMENT_CMODE_QUIRKS
@ LXB_DOM_DOCUMENT_CMODE_LIMITED_QUIRKS
struct lxb_html_tree lxb_html_tree_t
lxb_status_t lxb_html_token_data_skip_ws_begin(lxb_html_token_t *token)
@ LXB_HTML_TOKEN_TYPE_FORCE_QUIRKS
@ LXB_HTML_RULES_ERROR_BADOTOININMO
@ LXB_HTML_RULES_ERROR_UNTOININMO
bool lxb_html_tree_insertion_mode_initial(lxb_html_tree_t *tree, lxb_html_token_t *token)
LXB_API bool lxb_html_tree_insertion_mode_before_html(lxb_html_tree_t *tree, lxb_html_token_t *token)
void lxb_dom_document_attach_doctype(lxb_dom_document_t *document, lxb_dom_document_type_t *doctype)
void lxb_dom_node_insert_child_wo_events(lxb_dom_node_t *to, lxb_dom_node_t *node)
bool lxb_html_tree_process_abort(lxb_html_tree_t *tree)
lxb_dom_comment_t * lxb_html_tree_insert_comment(lxb_html_tree_t *tree, lxb_html_token_t *token, lxb_dom_node_t *pos)
void lxb_html_tree_parse_error(lxb_html_tree_t *tree, lxb_html_token_t *token, lxb_html_tree_error_id_t id)
lxb_dom_document_type_t * lxb_html_tree_create_document_type_from_token(lxb_html_tree_t *tree, lxb_html_token_t *token)
bool lexbor_str_data_ncasecmp(const lxb_char_t *first, const lxb_char_t *sec, size_t size)
bool lexbor_str_data_casecmp(const lxb_char_t *first, const lxb_char_t *sec)
lxb_dom_document_cmode_t compat_mode
lxb_dom_document_t dom_document
lxb_html_token_type_t type
const lxb_char_t * text_end
const lxb_char_t * text_start
lxb_html_tree_insertion_mode_f mode
lxb_html_document_t * document
strncmp(string $string1, string $string2, int $length)