-
Notifications
You must be signed in to change notification settings - Fork 4
/
215.txt
97 lines (66 loc) · 3.99 KB
/
215.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
* 仕様書
[REFS[
- [7] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-04-25 04:40:19 +09:00]] 版) <https://html.spec.whatwg.org/#read-xml>
- [1] [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-xhtml-documents>
- [3] [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-xhtml-fragments>
]REFS]
[2] >>1 では単独の[[文書]]としての[[構文解析]]が、 >>3 では適当な [CODE(DOMi)@en[[[Element]]]] の文脈や任意の
[CODE(DOMi)@en[[[Document]]]] の文脈での[[構文解析]] ([CODE(DOMa)@en[[[innerHTML]]]]) が規定されています。
* 概念
[FIG(short list)[
- [[XMLにおける文字コード]]
- [[実体解決器]]
- [[XHTML名前付き文字参照DTD]]
]FIG]
[6] [[XML構文解析器]]は、[[整形式]]制約違反などのエラーを[[構文解析]]結果の[[文書]]中に記述しても構いません [SRC[>>7]]。
;; [8] >>7 は [[navigate]] における規定ですが、 [CODE(DOMm)@en[[[parseFromString]]]]
などでも行われています。
[13] これは [[fingerprinting vector]] です。
[9] [[navigate]] は [[XML文書]]の[[構文解析]]によって得られた[[文書要素]]の[[名前空間]]によって、
[[XML文書]]の直接[[レンダリング]]以外の動作モードに切り替わることがあります。
;; [[navigate]] 参照。
* API
[15] [[構文解析器 (Web)]] を参照。
* 関連
[SEE[ [[XMLの非正規的処理]] ]]
* 歴史
[10] [[Gecko]] は長らく [[incremental rendering]] に対応しておらず、
すべて[[構文解析]]を終えてから表示していました。
この動作は、仕様上現在も明確に認められています [SRC[>>7]]。
;; [11] [[HTML]] とは違ってそのような動作であっても [[Web互換性]]に影響しないと見られます。
;; [12] [[XML]] はあまり使われていないので改良の優先度が低いとされていました。
[5] [[XML5]]
[REFS[
- [4] [CITE@en[Web Applications 1.0 r8728 Provide a way for other specs to invoke the XML parser without scripting enabled]] ([TIME[2014-08-29 08:38:00 +09:00]] 版) <http://html5.org/r/8728>
]REFS]
[14] [CITE@ja[非整形式なXHTMLのエラー表示 | Web標準Blog | ミツエーリンクス]]
([TIME[2015-06-10 23:18:44 +09:00]] 版)
<http://standards.mitsue.co.jp/archives/001288.html>
[16] [CITE@en[Add custom elements to HTML · whatwg/html@6e7eaa4]]
([TIME[2016-04-26 18:25:07 +09:00]] 版)
<https://github.com/whatwg/html/commit/6e7eaa4bd2912965fd83766f99f984f249531f3a>
[FIG(quote)[
[FIGCAPTION[
[17] [CITE[カシミール・ユーザーズ・ボード]]
( ([TIME[2016-06-14 02:03:39 +09:00]]))
<http://www.kashmir3d.com/bbs/userboard/boardmsg.cgi?15363>
]FIGCAPTION]
> GPXファイルでtrkpt要素が空の場合、
> <trkpt lat=*** lon=*** />
> と記述されているとカシミールで読み込んでもらえません。
> <trkpt lat=*** lon=***></trkpt>
> と置換すると正常に読み込めるのですが、
]FIG]
[18] [CITE@en[XProc 2.0: Standard Step Library]]
([TIME[2016-07-21 14:39:32 +09:00]])
<https://www.w3.org/TR/2016/NOTE-xproc20-steps-20160721/#c.unescape-markup>
[19] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-03-21 16:02:06 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#func-parse-xml>
[20] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-03-21 16:02:06 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#func-parse-xml-fragment>
[21] [CITE@en[1481080 - DOMParser parsing text/xml is 4 times slower than text/html]]
([TIME[2020-10-19T07:48:15.000Z]])
<https://bugzilla.mozilla.org/show_bug.cgi?id=1481080>
[22] [CITE[XML::Parser::Liteの拡張]], [TIME[2004-09-18T01:05:32.000Z]], [TIME[2021-01-02T04:26:28.579Z]] <http://www.donzoko.net/cgi/xmlparser/>