/
761.txt
530 lines (392 loc) · 27.3 KB
/
761.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
[9] [DFN[[RUBYB[HTML構文]@en[The HTML syntax]]]] は、 [[HTML]] の構文の一種で、最もよく使われているものです。 [[HTML構文]]は [[SGML]] 風の構文を持っていますが、 [[SGML]] の[[部分集合]]でも[[超集合]]でもなく、
互換性はありません。[[HTML構文]]の第5版は特に [DFN[[[HTML5]]]] と呼ばれています。
;;
[10] [[HTML構文]]に対して、 [[XML]] を構文として採用したものを [[XHTML構文]]と呼びます。
[[XHTML構文]]の第5版は特に [DFN[[[XHTML5]]]] と呼ばれています。
[[XHTML構文]]は実際にはほとんど使われていません。
[11] [[HTML5]] (構文) や [[XHTML5]] は、どちらも [[HTML5]] 仕様書で定義されています
(紛らわしいですね)。
[12]
また、 [[DOM]] における [CODE(DOMi)@en[[[Document]]]] には
[DFN[[RUBYB[[[HTML文書]]]@en[HTML document]]]]と[[XML文書]]の2種類があります
[SRC[[[HTML5]]]]。両者は、元々どちらの構文で書かれていたかとおおむね一致します。
;; 「おおむね」なのは、 [[DOM]] 上の操作で作られた [CODE(DOMi)@en[[[Document]]]]
も存在するからです。
;; ただし、両者を特に区別せずに「[[HTML文書]]」ということもあります ([[HTML5]]
仕様書の章節名自体がそうなっています)。
* 仕様書
[REFS[
-[13] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2012-12-31 05:55:07 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#syntax>
]REFS]
* 媒体型
[14] [[HTML文書]] ([[HTML構文]]で記述された[[文書]]) は、[[媒体型]]
[CODE(MIME)@en[[[text/html]]]] として[[札付け]]しなければ[['''なりません''']]
[SRC@en[[[HTML5]]]]。
[15] 逆に、[CODE(MIME)@en[[[text/html]]]] と[[札付け]]された[[文書]]は
[[HTML構文]]として解釈されます [SRC[[[HTML5]]]]。
* 構文
[FIG(list short)[
- [[要素]]
-- [[void要素]]
-- [[生テキスト要素]]
-- [[外来要素]]
- [[開始タグ]]
- [[終了タグ]]
- [[属性]]
- [[護符]]
- [[認められている斜線]]
- [[文字参照]]
]FIG]
[98] 過去に [[HTML]] で用いられていたこともある構文には次のものがあります。
[FIG(short list)[
- [[条件付き注釈]]
- [[saved from url]]
- [[RDF/XML/HTML注釈]]
- [[スクリプトマクロ]]
- [[処理指令]]
- [[SGML宣言]]
]FIG]
* 他の言語への HTML の埋め込み構文
[FIG(short list)[
- [[escaped markup]]
]FIG]
* 特別な制約
[4] [[文字符号化宣言]]については、[[文字参照]]を使ってはいけないことや先頭1024バイトに含まれないといけないことのような通常の[[要素]]と異なる制約があります。
[102] [[Pingback]] はその [CODE(HTMLe)@en[[[pingback]]]] [[要素]]の[[文字列]]表現に特別な制約を設けています。
* 構文解析
;; [88] [[HTML構文解析器]]と[[XML構文解析器]]に共通の事項に関しては、
[[構文解析器 (Web)]] を参照してください。
** 仕様書
[REFS[
- [50] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2012-12-31 05:55:07 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#parsing>
- [51] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2012-12-31 05:55:07 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#parsing-html-fragments>
]REFS]
[52] >>50 では単独の[[文書]]としての[[構文解析]]が、>>51 では特定の [CODE(DOMi)@en[[[Element]]]]
の文脈や任意の [CODE(DOMi)@en[[[Document]]]] の文脈での[[構文解析]] ([CODE(DOMa)@en[[[innerHTML]]]]) が規定されています。
** 刺激的な概念
[FIG(list short)[
- [[change the encoding]]
- [18] [[DOCTYPEスイッチ]]
- [16] [[里親付け]]
- [17] [[養子縁組代理店算法]] ([[AAA]])
- [40] [[多妻ノアの箱舟]]
- [63] [[frameset-ok]]
- [[スクリプトフラグ]]
]FIG]
** 構文解析器の構成要素
[FIG(list short)[
- [[入力ストリーム]]・[[入力バイトストリーム]]
- [[preload scanner]]
- [[構文解析エラー]]
- [[開いている要素のスタック]]
- [[活性書式付け要素のリスト]]
]FIG]
[FIG(list members)[
:[[script nesting level]]:[CODE(JS)@en[[[document.open]]]] から参照されます。
:[[script-created parser]]:[CODE(JS)@en[[[document.open]]]] で作られたかどうかを表します。
:構文解析したテキスト:[CODE(JS)@en[[[document.open]]]] から参照されます。
[[文書]]の [[reload override buffer]] と同じかもしれません。
[CODE(JS)@en[[[document.open]]]] を参照。
]FIG]
;; [[構文解析器 (Web)]] も参照。
* その他の話題
[FIG(list short)[
- [34] [[HTMLのレンダリングの開始]]
- [CODE(JS)@en[[[document.open]]]]
]FIG]
* 非線形な変形
[77] [[HTML構文解析器]]は通常[[節点]]を[[親]]から[[子]]へ、[[兄]]から[[弟]]へ、
[[属性]]から[[内容]]へと順に[[DOM木]]を構築していき、逆方向に進むことはありません。
しかし例外的に次のケースでは、それ以外の[[節点]]に変更が加えられることがあります。
[FIG(list short)[
- [[change the encoding]]
- [[里親付け]]
- [[AAA]]
- [CODE(HTMLe)@en[[[frameset]]]]
- 重複 [CODE(HTMLe)@en[[[html]]]]、[CODE(HTMLe)@en[[[body]]]] タグ
- [CODE(HTMLe)@en[[[head]]]] 後、 [CODE(HTMLe)@en[[[body]]]] 後
- [CODE(HTMLe)@en[[[script]]]]
]FIG]
[89] [[restart the parser]] が発動すると[[構文解析器]]のみならず
[[navigate]] のレベルで処理が再起動されることがあります。
[78] [[里親付け]]が発生すると、開いている [CODE(HTMLe)@en[[[table]]]]
[[要素]]の[[兄]]として[[要素]]などが挿入されることがあります。
[79] [[AAA]] が発動すると、[[節点]]が移動することがあります。
[REFS[
- [80] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2014-07-10 19:47:06 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#misnested-tags:-b-p-/b-/p>
]REFS]
[81] [[frameset-ok]] フラグが ok な状態で [CODE(HTMLe)@en[[[frameset]]]]
[[開始タグ]]が現れると、 [CODE(HTMLe)@en[[[body]]]] [[要素]]が削除されます。
[82] [CODE(HTMLe)@en[[[html]]]] [[開始タグ]]や [CODE(HTMLe)@en[[[body]]]]
[[開始タグ]]は、2つ目以降であっても[[属性]]は (既に設定されていなければ)
無視されずに設定されます。
;; [83] [[スクリプト]]によって設定された[[属性]]も含めて、[[開始タグ]]時点で設定されていない場合のみ2つ目以降の[[開始タグ]]の[[属性]]が該当[[要素]]に設定されます。
[REFS[
- <http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cbody%3E%0A%0A%3Cscript%3E%0A%20%20document.body.setAttribute%20(%27a%27%2C%202)%3B%0A%3C%2Fscript%3E%0A%0A%3Cbody%20a%3D1%3E>
]REFS]
[86] [CODE(HTMLe)@en[[[head]]]] [[終了タグ]]より後で [CODE(HTMLe)@en[[[body]]]]
[[開始タグ]]より前に現れた [CODE(HTMLe)@en[[[head]]]] [[要素]]の中に現れる[[要素]]は
[CODE(HTMLe)@en[[[head]]]] [[要素]]に挿入され、
[CODE(HTMLe)@en[[[body]]]] [[終了タグ]]より後に現れた[[子要素]]や[[テキスト]]は
[CODE(HTMLe)@en[[[body]]]] [[要素]]に挿入されます。
同じ位置でも[[空白]]や[[注釈]]なら見かけ上の[[親要素]]に挿入されますから、
[[空白]]や[[注釈]]の後に[[子要素]]や[[空白]]以外の[[テキスト]]があると、
[[DOM]] 上の順序が入れ替わります。更に [CODE(HTMLe)@en[[[body]]]]
[[要素]]に関しては、一度[[要素]]や[[テキスト]]が現れると
[CODE(HTMLe)@en[[[body]]]] が[[開いている要素のスタック]]に戻されるので、
その後現れた[[注釈]]や[[空白]]は [CODE(HTMLe)@e[[[body]]]]
[[要素]]に追加されるようになります。
[84] [[構文解析器]]の動作の途中で実行された [CODE(HTMLe)@en[[[script]]]]
により、[[構文解析器]]の途中の[[DOM木]]は任意の形に変形されることがあります。
そのような変形があった後でも、[[構文解析器]]は[[里親付け]]を除き、
[[DOM木]]の最新の状態ではなく[[構文解析]]直後の状態に基づき処理を進めていきます。
[EG[
[85] 例えば[[構文解析]]の途中で [CODE(HTMLe)@en[[[script]]]] が[[開いている要素のスタック]]上の[[要素]]を他の[[文書]]に移動すると、
以後[[構文解析]]が進んでいくと現れる[[要素]]はそちらの[[文書]]に挿入されていくことになります。
]EG]
[90] [[スクリプト]]によって [CODE(HTMLe)@en[[[table]]]] [[要素]]が[[根要素]]となった状態で[[里親付け]]が発生すると、
[[要素]]や[[テキスト]]の挿入先が [CODE(DOMi)@en[[[Document]]]]
になり、 [[DOM]] の制限上挿入できないため、[[構文解析]]の結果が捨てられることとなります。
(捨てられる部分に[[スクリプト]]が含まれていると、[[文書]]に[[挿入]]されないので、
実行もされません。)
* 奇癖モード
[94] [[奇癖モード]]や[[限定奇癖モード]]には、 [[DOCTYPEスイッチ]]によって切り替わります。
[91] [[奇癖モード]]で [CODE(HTMLe)@en[[[p]]]]
[[要素]]が開いている時に [CODE(HTMLe)@en[[[table]]]]
[[要素]]の[[開始タグ]]が現れても、 [CODE(HTMLe)@en[[[p]]]]
[[要素]]は閉じられず、 [CODE(HTMLe)@en[[[table]]]] [[要素]]は [CODE(HTMLe)@en[[[p]]]]
[[要素]]の[[子孫]]となります。
[92] 現在の [[HTML Standard]] では、モードによって[[構文解析]]の動作が変わるのはこれだけです。
;; [93] 歴史的には[[注釈]]の[[構文解析]]の方法が違っていたりしました。
詳しくは[[奇癖モード]]を参照してください。
[95] [[構文解析]]の途中で[[スクリプト]]により [CODE(JS)@en[[[document.open]]]] が呼び出されると、
[CODE(DOMi)@en[[[Document]]]] のモードが途中で変化することがあります。
しかし [CODE(JS)@en[[[document.open]]]] は[[構文解析器]]を停止させ、
新しい[[構文解析器]]で以後の [CODE(JS)@en[[[document.write]]]]
を処理します。ですから、一旦 [[DOCTYPEスイッチ]]でモードが決まると、
その後モードが変わることはありません。
;; 複数 [[DOCTYPE]] があっても、最初のもの以外は無視されます。
* テキストファイルの DOM 構築
[106] [[HTML構文解析器]]は、[[テキストファイル]]への [[navigate]]
でも使われます。
[107] [[HTML構文解析器]]は、 [[MIME型]]として [CODE(MIME)@en[[[text/html]]]]
以外を指定した時の [CODE(JS)@en[[[document.open]]]] の処理でも使われます。
;; [108] [[テキストファイルのDOM構築]]を参照。
* 媒体文書とプラグイン文書、エラー文書
[109] [[navigate]] における[[媒体文書]]、[[プラグイン文書]]、エラー文書の生成では、
[[HTML構文解析器]]は使われませんが、それにほぼ相当する動作が行われます。
;; [110] 例えば [[AppCache選択アルゴリズム]]や [[stop parsing]] が適宜呼び出されます。
;; [111] [[[CODE(HTMLe)@en[iframe]] [CODE(HTMLa)@en[srcdoc]]文書]]の[[構文解析]]のように、
[[DOCTYPE]] はありませんが、[[無奇癖モード]]として扱われるようです。
* 歴史
** Web Forms 2.0 HTML 構文の構文解析
[1] [[Web Forms 2.0]] は従来の [[HTML]] と
[[XHTML]] の両方の構文を認めています。
この章では、 [[HTML]] 構文の[[構文解析]]について扱います。
[2] 仕様書:
- [[Web Forms 2.0]]
-- [CSECTION@en[2.18. Handling unexpected elements and values]]
<IW:WF2:"#handling">
[3] '''誤り処理'''
[[Web Forms 2.0]] は、 [[SGML]]
で規定されない曖昧な場合にどう[[構文解析]]するか正確には規定しません。
[[利用者エージェント]]の実装者は、
既存の製品を[[逆工学]]し、適当な動作を模倣[['''するべきです''']]。
[SRC@en[WF2 2.18]]
[5]
[[Web Forms 2.0]] は [[HTML 4]] の拡張として定義されており、
その [[HTML 4]] が [[SGML]] に基づいているので、
>>3 のように規定されているのだと思われます。
しかし、 [[Web Forms 2.0]] の [[HTML]]
[[文書]]は一般に[[妥当]]な [[SGML]]
[[文書]]ではありません ([[DTD]] がないので)。
誤っている[[文書]]は >>4 のように処理するとして、
誤っていない[[文書]]をどう[[構文解析]]するのがいいのかは
[[Web Forms 2.0]] は (わざと) 曖昧にしています。
** HTML5 仕様書による構文解析算法の明確化
[8] [CITE['''['''whatwg''']''' HTML5 Parsing spec first draft ready]] ([TIME[2008-04-02 11:17:11 +09:00]] 版) <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-February/005807.html>
[67] [[HTML5]] の[[構文解析]]の仕様は既存の [[Webブラウザー]]の[[HTML構文解析器]]を[[逆工学]]したものでしたが、
既存の[[構文解析器]]は細部においては異なっていましたから、どの [[Webブラウザー]]とも完全には一致していませんでした。
そのためすべての主要 [[Webブラウザー]]が[[構文解析器]]を書き直すことになりました。
この新世代の[[構文解析器]]は一般に[DFN[[RUBYB[HTML5構文解析器]@en[HTML5 parser]]]]と呼ばれています。
[REFS[
- [68] [CITE[Surfin' Safari - Blog Archive » The HTML5 Parsing Algorithm]] ([TIME[2014-04-24 10:47:09 +09:00]] 版) <https://www.webkit.org/blog/1273/the-html5-parsing-algorithm/>
- [69] [CITE@en-US[HTML5 Parser - Web developer guide | MDN]] ([TIME[2014-03-21 12:22:14 +09:00]] 版) <https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/HTML5_Parser>
- [71] [CITE@en[Dev.Opera — 100% Ragnarök’n’roll]] ([TIME[2014-04-24 08:33:46 +09:00]] 版) <http://dev.opera.com/blog/100-ragnarok-n-roll/>
- [70] [CITE@en[HTML5 Parsing in IE10 - IEBlog - Site Home - MSDN Blogs]] ([TIME[2014-04-24 10:49:14 +09:00]] 版) <http://blogs.msdn.com/b/ie/archive/2011/07/06/html5-parsing-in-ie10.aspx>
]REFS]
* 実装
[76] [[IE9]] は [CODE(XMLe)@en[[[svg]]]] [[開始タグ]]を正しく処理できますが、
[CODE(XMLe)@en[[[math]]]] [[開始タグ]]は未知の [[HTML]] [[開始タグ]]とみなすようです。
* メモ
[6]
[CITE@en[Tag Soup: How Mac IE 5 and Safari handle <x> <y> </x> </y>]] ([[Henri Sivonen]] 著, [CODE[2005-07-28 02:07:37 +09:00]] 版) <http://hsivonen.iki.fi/soup-dom/>
[7]
[CITE[Bug 311366 – should make custom elements able to contain blocks (<section>)]] ([TIME[2007-09-17 12:38:22 +09:00]] 版) <https://bugzilla.mozilla.org/show_bug.cgi?id=311366>
[19] [CITE[IRC logs: freenode / #whatwg / 20090813]]
([TIME[2009-10-10 21:27:36 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090813#l-171>
[20] [CITE[IRC logs: freenode / #whatwg / 20100324]]
([TIME[2010-04-03 01:03:00 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100324>
[21] [CITE[Notes on HTML5 Parser History — Anne’s Weblog]]
([TIME[2010-06-03 08:06:42 +09:00]] 版)
<http://annevankesteren.nl/2010/05/html5-parser-history>
[22] [CITE['''['''webkit-dev''']''' HTML5 tokenizer landing soon]]
([TIME[2010-06-22 06:33:13 +09:00]] 版)
<https://lists.webkit.org/pipermail/webkit-dev/2010-June/013244.html>
[23] [CITE[IRC logs: freenode / #whatwg / 20100727]]
([TIME[2010-08-11 00:06:17 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100727#l-1210>
[24] [CITE[IRC logs: freenode / #whatwg / 20100805]]
([TIME[2010-08-12 23:43:53 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100805#l-303>
[25] [CITE[IRC logs: freenode / #whatwg / 20100913]]
( ([TIME[2010-09-26 22:31:37 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100913#l-265>
[26] [CITE[IRC logs: freenode / #whatwg / 20100915]]
( ([TIME[2010-09-28 00:57:22 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100915#l-454>
[27] [CITE@en[Web Applications 1.0 r5521 Parser foreign lands: Get rid of secondary insertion mode, always use 'in body', scope HTML in foreign lands so that we won't try to close elements cross-namespace (e.g. <svg><p><desc><form> won't imply a </p> that closes the <p>...; <td> won't close all the SVG if the SVG is in a cell).Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10314]]
( ([TIME[2010-09-28 08:45:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5520&to=5521>
[28] [CITE@en[Web Applications 1.0 r5522 Parser foreign lands: Oops, I missed one of the ways that scoping happens.Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10314]]
( ([TIME[2010-09-28 08:54:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5521&to=5522>
[29] [CITE@en[Web Applications 1.0 r5563 Revamp how the foreign lands are defined to make it easier to add the U+0000 handling. This checkin should have no normative effect. If there are any normative changes in this patch, that's a bug, pleasel let me know ASAP.Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9659]]
( ([TIME[2010-09-30 10:40:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5562&to=5563>
[30] [CITE@en[Web Applications 1.0 r5638 Add in some hard-coded limits for dealing with unclosed formatting elements to limit the explosive growth of the list of formatting elements in commonly-seen cases.Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10802]]
( ([TIME[2010-10-16 07:56:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5637&to=5638>
[31] [CITE[Bug 10802 – Limit the number of identical items on the list of active formatting elements by removing previous duplicates when adding new items]]
( ([TIME[2010-10-16 08:37:29 +09:00]] 版))
<http://www.w3.org/Bugs/Public/show_bug.cgi?id=10802>
[32] [CITE[Bug 10801 – Limit the number of iterations in the loops in the AAA]]
( ([TIME[2010-10-16 08:38:38 +09:00]] 版))
<http://www.w3.org/Bugs/Public/show_bug.cgi?id=10801>
[33] [CITE[IRC logs: freenode / #whatwg / 20101021]]
( ([TIME[2010-10-29 23:31:18 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101021>
[35] [CITE@en[Web Applications 1.0 r5920 Change how MathML and SVG are parsed in text/html: use a three-level tree constructor design instead of the two-level design we had before.]]
( ([TIME[2011-03-01 08:56:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5919&to=5920>
[36] [CITE[IRC logs: freenode / #whatwg / 20110203]]
( ([TIME[2011-03-19 11:46:31 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110203#l-1313>
[37] [CITE@en-US[htmlparser: Summary]]
( ([TIME[2011-03-19 16:38:17 +09:00]] 版))
<http://hg.mozilla.org/projects/htmlparser/>
[38] [CITE[IRC logs: freenode / #whatwg / 20110608]]
( ([TIME[2011-06-11 01:00:34 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110608>
[39] [CITE[IRC logs: freenode / #whatwg / 20110724]]
( ([TIME[2011-08-06 17:45:59 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110724#l-388>
[41] [CITE[''''''[''''''whatwg'''''']'''''' <!DOCTYPE html><body><table><math><mi>foo</mi></math></table> and other parser questions]]
( ([TIME[2011-12-14 08:37:32 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-December/034163.html>
[42] [CITE@en[Web Applications 1.0 r6870 Try to fix the problem David Flanagan raised a while back with the <!DOCTYPE html><body><table><math><mi>foo</mi></math></table> test case.]]
( ([TIME[2011-12-14 07:36:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6869&to=6870>
[43] [CITE[IRC logs: freenode / #whatwg / 20120107]]
( ([TIME[2012-01-08 00:12:25 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120107>
[44] [CITE[''''''[''''''whatwg'''''']'''''' HTMLLinkElement.disabled and HTMLLinkElement.sheet behavior]]
( ([TIME[2012-01-28 11:20:09 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-January/034544.html>
[45] [CITE[''''''[''''''whatwg'''''']'''''' document.write("\r"): the spec doesn't say how to handle it.]]
( ([TIME[2012-02-14 08:40:30 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-February/034867.html>
[46] [CITE@en[Web Applications 1.0 r6991 Rejig the wording of the character encoding section to make it more precise and in particular to not make CR processing require look-ahead.]]
( ([TIME[2012-02-14 07:48:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6990&to=6991>
[47] [CITE[''''''[''''''whatwg'''''']'''''' A plea to Hixie to adopt <main>, and main element parsing behaviour]]
( ([TIME[2012-11-08 07:11:56 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/037828.html>
[48] ( ([TIME[2012-11-09 02:23:02 +09:00]] 版))
<http://www.score.is.tsukuba.ac.jp/~minamide/papers/minamide-FM2012.pdf>
[49] ( ([TIME[2012-03-12 04:52:17 +09:00]] 版))
<http://www.score.cs.tsukuba.ac.jp/~minamide/html5spec/model.html5>
[53] [CITE[''''''[''''''webkit-dev'''''']'''''' Feature Announcement: Moving HTML Parser off the Main Thread]]
( ([TIME[2013-01-10 19:57:20 +09:00]] 版))
<http://lists.webkit.org/pipermail/webkit-dev/2013-January/023271.html>
[54] [CITE[HTML parser design - Google ドライブ]] ([TIME[2013-02-16 05:58:52 +09:00]] 版) <https://docs.google.com/a/google.com/drawings/d/1hwYyvkT7HFLAtTX_7LQp2lxA6LkaEWkXONmjtGCQjK0/edit>
[55] [CITE[Threaded HTML parser enabled on trunk - Google グループ]]
( ([TIME[2013-05-26 05:42:39 +09:00]] 版))
<https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/hBUVtg7gacE>
[56] [[Chrome]] は [[JavaScript]] の実行をドメインごとにブロックできますが、
ブロックまたはブロック解除の直後は [[JavaScript]] の実行のみオン・オフされ、[[HTML]]
の構文解析器は従前のモードのままになります。[[ウィンドウ]]を閉じて開き直すと完全に反映されます。
このため構文解析器は [CODE(HTMLe)@en[[[noscript]]]] の中身を解釈するのに [[JavaScript]]
が実行されたり、その逆になったりします。 [TIME[2013-06-07T05:52:05.700Z]]
[57] [CITE@en[Web Applications 1.0 r7999 Another very risky change! Please review! This attempts to refactor the parser logic so that the ownerDocument is explicitly set at each place a node is created by the parser. This actually fixes an ambiguity, which was what should happen when a script has transplated a node that is still on the stack of open elements into a Document without a browsing context, if the node created has some magic (e.g. <img src>, <script>).]]
( ([TIME[2013-06-26 05:55:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7998&to=7999>
[58] [CITE@en[Web Applications 1.0 r7998 Very risky editorial change! Please review! This attempts to refactor the parser logic so that the foster parenting is actually done inline in a single algorithm that is called by anywhere in the parser that could be affected by it. This will allow us to add the <template> magic with minimal actual magic in the prose, hopefully.]]
( ([TIME[2013-06-25 14:37:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7997&to=7998>
[59] [CITE[''''''[''''''whatwg'''''']'''''' Namespaces and tag names in the HTML parser]]
( ([TIME[2013-07-02 07:53:15 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-July/039913.html>
[60] [CITE[''''''[''''''whatwg'''''']'''''' Another issue in 12.2.5.5 parsing tokens in foreign content]]
( ([TIME[2013-08-01 01:41:59 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-July/040314.html>
[61] [CITE@en-GB-x-Hixie[Hixie's Natural Log: Tag Soup: How UAs handle <x> <y> </x> </y>]]
( ([TIME[2013-08-18 19:11:22 +09:00]] 版))
<http://ln.hixie.ch/?start=1037910467&count=1>
[62] [CITE@en[Streamable non-fatal non-conforming HTML parser error recovery strategy]]
( ([[Simon Pieters]] 著, [TIME[2013-10-03 23:25:16 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-archive/2013Oct/0009.html>
[64] [CITE@en[Parsing (Windows)]]
( ([TIME[2013-11-13 13:54:34 +09:00]] 版))
<http://msdn.microsoft.com/en-us/library/ie/hh673554(v=vs.85).aspx>
[65] [CITE[''''''[''''''whatwg'''''']'''''' Should ambiguous ampersand be a parse error?]]
( ([TIME[2014-01-22 23:54:55 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-January/041905.html>
[66] [CITE@en[Web Applications 1.0 r8554 Drop filterRes SVG attribute from the HTML parser, since it has fallen into disrepute.]]
( ([TIME[2014-03-19 03:36:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8553&to=8554>
[72] [CITE[IRC logs: freenode / #whatwg / 20140427]]
( ([TIME[2014-04-29 10:55:29 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140427>
[73] [CITE@en[Web Applications 1.0 r8592 PARSER CHANGE: remove some attributes from the SVG attribute mapping]]
( ([TIME[2014-05-01 03:55:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8591&to=8592>
[74] [CITE[nolanw/HTMLReader]]
( ([TIME[2014-06-14 02:51:00 +09:00]] 版))
<https://github.com/nolanw/HTMLReader>
[75] [CITE[IRC logs: freenode / #whatwg / 20140613]]
( ([TIME[2014-06-14 11:47:11 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140613#l-683>
[87] [CITE[Flag HTML response as "HTML document". Set encoding also for XML. https:... · 572a6c6 · whatwg/xhr]]
( ([TIME[2014-01-08 07:27:26 +09:00]] 版))
<https://github.com/whatwg/xhr/commit/572a6c6c86562d31a217dac95d3e845ecc9a0fe4>
[96] [CITE[IRC logs: freenode / #whatwg / 20091112]]
([TIME[2009-12-17 23:21:20 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20091112>
[97] [CITE[''''''[''''''whatwg'''''']'''''' Parser-related philosophy]]
( ([TIME[2013-07-27 06:52:19 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-July/040261.html>
[99] [CITE[Surfin' Safari - Blog Archive » The HTML5 Parsing Algorithm]]
( ([TIME[2014-09-03 04:18:21 +09:00]] 版))
<https://www.webkit.org/blog/1273/the-html5-parsing-algorithm/>
[100] [CITE@en[886390 – Assigning to innerHTML on an SVG element should create elements in the SVG namespace]]
( ([TIME[2014-09-09 02:17:17 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=886390>
[101] [CITE@en[Web Applications 1.0 r8856 Try to clarify stuff around fragment parsing (this removes the ability to call the fragment parsing algorithm without a context node; I couldn't find anyone doing that, but if I missed a case please let me know)]]
( ([TIME[2014-11-21 03:08:00 +09:00]] 版))
<https://html5.org/r/8856>
[103] [CITE@en[Web Applications 1.0 r8889 Clarify the handling of CRLF in HTML.]]
([TIME[2015-03-05 09:29:00 +09:00]] 版)
<https://html5.org/r/8889>
[104] [CITE[Part1 - browsersec - Browser Security Handbook, part 1 - Browser Security Handbook - Google Project Hosting]]
([TIME[2015-03-31 16:58:06 +09:00]] 版)
<https://code.google.com/p/browsersec/wiki/Part1#Hypertext_Markup_Language>
[105] [CITE@en[Ygg01/html5ever]]
([TIME[2015-04-29 00:32:43 +09:00]] 版)
<https://github.com/Ygg01/html5ever>
[112] [CITE[Hixie's Natural Log: Tag Soup: Crazy parsing adventures]]
<http://ln.hixie.ch/?start=1137740632&count=1>
おかしな[[HTML]][[文書]]から各ブラウザが生成する[[DOM]]は奇々怪々。
([[名無しさん]] [WEAK[2006-01-21 04:09:31 +00:00]])