-
Notifications
You must be signed in to change notification settings - Fork 4
/
506.txt
342 lines (252 loc) · 18.7 KB
/
506.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
[518] [DFN@en[XHTML]] ([DFN@en[Extensible Hypertext Markup Language]]、
[DFN[拡張可能ハイパーテキスト・マーク付け言語]]) は、 [[XML]] の[[構文]]によって記述された
[[HTML]] です。 [[XHTML]] は1990年代末から2000年代初頭にかけて [[HTML]] と [[Web]]
の近未来であると信じられてきましたが、規格開発の迷走と [[Webブラウザー]]の実装者や
[[Webサイト]]・ [[Webアプリケーション]]製作・開発者からの不支持により、
旧来の [[HTML]] から [[XHTML]] への移行は失敗に終わったとの見方が強まっています。
* バリエーション
:[[XHTML1]]: [[HTML4]] を [[XML]] に移植した [[XHTML 1.0]] にはじまり、
小改訂を重ねた [[XHTML m12n]]、[[XHTML 1.1]] などを含む系統です。
[[W3C]] [[XHTML2 WG]] (旧 [[HTML WG]]) により仕様策定が行われてきました。
:[[XHTML2]]: [[XHTML1]] を1から見直すという触れ込みで宣伝された次世代
[[XHTML]] 仕様案でしたが、支持を得られず完成しないまま放棄されることになりました。
:[[XHTML5]]: [[HTML5]] の [[XML]] 構文による表現です。後方互換性を破棄して新たに設計し直すとした
[[XHTML2]] に対し、 [[XHTML5]] は [[XHTML 1.0]]
に対する後方互換性を維持したまま新時代の要求に応えようと試みています。
* 定義
** WHATWG による定義
@@ [526] 書きかけ
[527] [[XHTML]] は[[語彙]]としての [[HTML]] を使って記述された[[文書]]を [[XML]]
という[[構文]]によって表現したものです。 [[HTML5]] 仕様書では [[XHTML5]] とも呼んでいます。
** XHTML2 WG による定義
[26]
>
:[DFN@en[[[XHTML]]]]:
[[拡張可能ハイパーテキストマーク付け言語]]。
[[XHTML]] は1つの1枚岩の[[マーク付け言語]]の名前ではなく、
この[[マーク付け言語]]を集成的に形成する[[文書型]]族の名前です。
[[XHTML]] の[[名前空間URI]] は
[CODE(URI)@en[[[http://www.w3.org/1999/xhtml]]]] です。
'''注意''': 将来の版の [[XHTML]] は異なる[[名前空間]]を用いるかもしれません。
;; 出典:
<http://www.w3.org/TR/2002/NOTE-xhtml-media-types-20020801/#term-XHTML>
(出版当時は [[HTML WG]]、後の [[XHTML2 WG]])
** メモ
[528] 両 Working Group の定義の違いは両者の [[HTML]] という言語に対する捉え方の違いが表れています。
[[XHTML2 WG]] は [[XHTML]] は複数の[[マーク付け言語]]の集合体であるとしました。
[[XHTML m12n]] 仕様書で規定される[[モジュール]]や [[Role]]、[[RDFa]]
等の個別仕様書で定義される[[モジュール]]、あるいは [[XHTML]]
以外で定義された[[モジュール]]を自由に組み合わせ、自由に「[[XHTML]] 族」
の[[マーク付け言語]]を設計できるようにしました。
一方で [[WHATWG]] は [[XHTML]] は単一の[[マーク付け言語]]であるとしました。
もちろん [[SVG]] など他の[[マーク付け言語]]と併用することも認めていますが、
かといってそれによって新たな[[マーク付け言語]]を設計するのではなく、
あくまで [[XHTML]] は1つとの立場を採っています。
[529] [[HTML]] は (あるいは [[W3C]] は) かねてからその目標の1つに [[Device Independence]]
を掲げてきました。両 WG のアプローチの違いは DI の実現方法の違いでもあります。
[[XHTML2 WG]] の考え方は、 device それぞれについて最適化された[[マーク付け言語]]を用意し、
その言語のための[[実装]]と[[文書]]を用意するというものです。一方で [[WHATWG]]
の考え方は、 device の物理的な性質とは一定の距離を置いた単一の[[マーク付け言語]]を用意し、
その言語を各 device の性質と事情に合わせた形で実装するべき、というところにあります。
* HTML と XHTML
[520] [[XHTML]] はそもそも旧来の [[HTML]] から [[XML]] [[構文]]へ移行しようという趣旨で作られました。
結果的には [[XHTML]] は旧来の [[HTML]] に対する (そこから移行させるだけの)
十分な利点を提供・周知できず、移行は失敗に終わりつつあります。
[[HTML]] と [[XHTML]] の関係やそれぞれの利点と欠点、あるいは移行の方法論に関しては様々な議論がありました。
詳しくは [[HTMLとXHTML]] の項をご覧ください。
[521] [[CSS]] における [[HTML]] と [[XHTML]] の[[レンダリング]]の違いについても同項をご覧ください。
* XHTML の媒体型
[519] [[XHTML]] の普及の妨げの1つは[[媒体型]]の問題でした。 [[XHTML]]
の[[媒体型]]について詳しくは [[XHTML媒体型]]の項をご覧ください。
* XHTML と携帯電話
[524] [[携帯電話]]の [[Webブラウザー]]は [[XHTML]] にしか対応していない、あるいは
[[XHTML]] にするべきだなどとする神話やプロパガンダが一部で横行したことがありました。
実際には[[携帯電話]]対象の [[Webサイト]]も [[PC]] 対象の [[Webサイト]]同様、
[[マーク付け]]の品質は非常に低く、[[携帯電話]]の [[Webブラウザー]]もまた、
[[誤り処理]]を行う“ふつう”の [[Webブラウザー]]に過ぎません。などという話題は
[[XHTMLと携帯電話]]の項をご覧ください。
* 歴史
** W3C 以外の XML 版 HTML
[15] [[W3C]] が HTML 4 を XML に移植した XHTML 1
を標準化する以前にも、独自に HTML を XML に移植しようとする試みが幾度かなされたことがありました。
[16]
''Schema for Object-Oriented XML'' <http://www.w3.org/TR/NOTE-SOX/>
は、1998年と1999年に W3C に提出された [[Note]]
で、 XML の schema 言語を提案しています。
この中で、文書説明の記述の手段として HTML
を採用しています。
[18]
''A Modular Hypertext Markup Language for Broadcast Applications'' <http://www.oasis-open.org/cover/bhtml-4.html>
TV 用の HTML で、 「Q[xHTML]] という [[HTML 4.0]] を基にした XML (の当時の原案) 版の HTML です。1998年10月。
** XHTML2 Working Group の終焉
[525] [[XHTML2 WG]] の項をご覧ください。
* 統計
[96]
[CITE[HTML5 IRC logs: w3c / #html-wg / 20070423]] ([CODE[2007-06-30 15:38:51 +09:00]] 版) <http://krijnhoetmer.nl/irc-logs/html-wg/20070423#l-17>
[[XML媒体型]]で提供されている[[頁]]のうち 0.0014%
が [[XHTML]]。
* 実例
[522] [[XHTML]] は実世界ではほとんど利用されていません。世間一般では [CODE(MIME)@en[[[text/html]]]]
で [[XHTML]] [[文書型]]を名乗る[[文書]]が利用されることがあり、実のところこの形態の[[文書]]はかなり大量に存在しているのですが、
旧 [[W3C]] [[HTML Working Group]] ([[XHTML2 Working Group]] の前身、現在の
[[HTML Working Group]] とは別組織) の方針に基づき [[Webブラウザー]]は [[XHTML]]
であると認識していません。真の [[XHTML]] は Web 全体でも数えるほどしか利用例がありません。
それすら、間違ったものが少なくありません。
[523] [[XHTML]] の実世界での利用例については [[XHTML実例]]の項をご覧ください。
* メモ
[7] XHTML[SUP[TM]] = E''x''tensible ''h''yper''t''ext ''m''arkup ''l''anguage。
拡張可能ハイパーテキスト・マーク付け言語。
[[WWW]] の基本マーク付け言語である [[HTML]] を、 [[XML]]
の構文のもとに再定義した[[マーク付け]]言語。
現在、 XHTML 1 系と XHTML 2 系があります。
[8] XHTML 1.0 は、 [[HTML4]] をほとんどそのまま、単に XML
の構文で書き直したものです。 HTML 4 に習熟していた人なら XML
の構文を少し学ぶだけで XHTML 1.0 で書けるようになりますし、
HTML 4 の文書はほとんどの場合機械的に XHTML 1.0
に修正できます。
XHTML m12n (XHTML のモジュール化) は、 XHTML 1.0
を[[モジュール]]群に分解したものです。
一般の利用者にはあまり直接的な利点はありませんが、モジュール化によって必要な機能だけの部分集合を作ったり、他の言語に取り込んだりすることが容易になります。
XHTML m12n の応用としては XHTML Basic (1.0), XHTML 1.1,
XHTML + SVG + MathML (画像や数式を埋め込める。) などがあります。
XHTML Basic は、携帯機器など限られた能力の機器を意識した、語彙が少なめの
XHTML です。 XHTML 1.1 は、 XHTML 1.0 Strict を XHTML m12n
の応用として再設計したものです。
[9] XHTML 2.0 は、現在 [[WD]] 段階でまだ正式な仕様ではありませんが、
HTML の誕生から現在まで歴史的に引きずっていた仕様も整理するなど大胆な変更が加えられ、より整った言語体系になると思われます。
(既に実験的に使い始めている人もいますが、実用段階になるのはまだ先でしょう。)
- [1] ''【野望の】XHTML 2.0【王国】'' <http://pc2.2ch.net/test/read.cgi/hp/1028659057/l50>
- [2] ''XHTML Eden'' <http://ryuzi.dyndns.org/xhtml/> 「XHTML を主眼に置いた ニュースサイトです。XHTML に関する話題を集めながら、XHTML を使うことが、HTML だけを使っているよりもメリットがあるのかどうかということを、考えて行きます」
- [3] ''マークの付けかた'' <http://math.oheya.to/markup/index.xhtml> XHTML2 文書, DTD, CSS が。
- [4] [[XPath]] で abbr[@title="Hypertext Transfer Protocol"] と書いて検索する検索園児んとかあったらいいよな。 [[HTML4]] に対する XHTML1 の利点はなんだとかよく言われるけど、こういう細かいことでもうれしいと思う。
- [5] >>4 [[XML]] でない [[SGML]] でも頑張れば同じことは出来るだろうけど、 XML の方が今は環境が整ってて楽でしょ。 (でもこんなこというと XML 厨とか言われるんだよな。打つ)
- [6] >>5 XML でも SGML でもいいから、 >>4 のような検索園児(wがいたら、 [CODE(XPath)[p/ul]] で検索して [[p]] 要素の中身に [[ul]] 要素を入れてる香具師を探すとか楽しめそうだ。
- [10] ''This is a page in XHTML 2.0 format - w3future.com'' <http://w3future.com/weblog/gems/xhtml2.xml>
- [11] ''IBM XHTML 1.0 Transitional DTD'' <http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd>
- [12] ''bubble hour - 2001/12 #2: XHTML 1.1 モジュールメモ'' <http://www1.odn.ne.jp/bungaku-shitsu/appendix/diary/d0112-2.html#day18-1>: XHTML モジュールの使い方についての [[satoshi]] タンの解説
- [13] ''XML Resource Directory Description Language (RDDL)'' <http://www.rddl.org/>: XHTML 1 と RDF を (無理やり) くっつけようとしたもの
- [14] ''The XHTML Family - Slide list'' <http://www.w3.org/2001/09/21-orf/xhtml-family/>: [[mimasa]] 氏の講演スライド。 [[XHTML]] の開発の歴史を簡単に学ぶことが出来ます。
[17]
''XHTML Frequently Answered Questions'' <http://www.w3.org/MarkUp/2004/xhtml-faq>
([[名無しさん]] [WEAK[2004-07-24 03:33:13 +00:00]])
[19]
[CITE[The Elements of Meaningful XHTML]] <http://tantek.com/presentations/2005/03/elementsofxhtml/>
([[名無しさん]])
[25]
[CITE[Re: Sniffing XHTML sent as text/html from Steven Pemberton on 2000-09-13 (www-html@w3.org from September 2000)]] <http://lists.w3.org/Archives/Public/www-html/2000Sep/0024.html>
([[名無しさん]])
[34]
[CITE[goer.org: The X-Philes]] ([CODE[2007-03-22 09:00:23 +09:00]] 版) <http://www.goer.org/Markup/TheXPhiles/>
[65]
[CITE@ja-JP[マークアップの順番 - Weblog]] ([CODE[2007-05-08 07:00:00 +09:00]] 版) <http://ryus.s21.xrea.com/w/item/902>
([[名無しさん]] [WEAK[2007-05-11 10:59:07 +00:00]])
[73]
[CITE@en[Re: XHTML Family Document Types and the validator]] ([[Shane McCarron]] 著, [CODE[2007-04-30 08:11:10 +09:00]] 版) <http://lists.w3.org/Archives/Public/www-validator/2007Apr/0175.html>
([[名無しさん]] [WEAK[2007-06-02 15:54:01 +00:00]])
[74]
[CITE[Bug 14 - XHTML Detection is over-eager.]] ([CODE[2007-06-03 00:51:05 +09:00]] 版) <http://www.w3.org/Bugs/Public/show_bug.cgi?id=14>
([[名無しさん]] [WEAK[2007-06-02 15:54:20 +00:00]])
[95]
[CITE@en[Re: input on name for XML serialization of HTML 5?]] ([[Steven Pemberton]] 著, [CODE[2007-06-21 23:22:32 +09:00]] 版) <http://lists.w3.org/Archives/Public/public-xhtml2/2007Jun/0025.html>
([[名無しさん]] [WEAK[2007-06-21 15:23:14 +00:00]])
[98]
[CITE@ja[ad_xhtml]] ([CODE[2003-04-08 01:38:08 +09:00]] 版) <http://xrea-memo.raccy.org/ad_xhtml.html>
([[名無しさん]])
[99]
[CITE@ja-JP[業者の宣伝 - Weblog]] ([CODE[2007-09-11 07:00:00 +09:00]] 版) <http://ryus.s21.xrea.com/w/item/955>
([[名無しさん]])
[101]
[CITE@en[Shorttags - the odd side of HTML 4.01 - W3C Q&A Weblog]] ([CODE[2007-10-10 19:13:03 +09:00]] 版) <http://www.w3.org/QA/2007/10/shorttags.html>
([[名無しさん]])
[102]
>>101 この話の展開には無理があるんじゃ・・・
[104]
[CITE[HTMLの採用について (agenda)]] ([CODE[2007-11-28 20:38:39 +09:00]] 版) <http://jintrick.net/agenda/2007/11/html-14.html>
([[名無しさん]] [WEAK[2007-11-30 01:15:07 +00:00]])
[106]
[CITE[seamonkey/parser/htmlparser/src/nsExpatDriver.cpp]] ([CODE[2007-11-19 20:16:26 +09:00]] 版) <http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/src/nsExpatDriver.cpp#285>
[530] [CITE[IRC logs: freenode / #whatwg / 20090711]]
([TIME[2009-09-15 21:54:30 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090711>
[531] [CITE@en[HTML5 Revision Tracker]]
([TIME[2010-02-11 22:43:26 +09:00]] 版)
<http://html5.org/tools/web-apps-tracker?from=4690&to=4691>
[532] [CITE@en[RE: Request for Volunteers: Polyglot spec]]
([[Eliot Graff]] 著, [TIME[2010-04-22 07:15:39 +09:00]] 版)
<http://lists.w3.org/Archives/Public/public-html/2010Apr/1091.html>
[533] [CITE@en[HTML/XHTML Compatibility Authoring Guidelines]]
([TIME[2010-04-22 07:52:33 +09:00]] 版)
<http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html>
[534] [CITE@en[HTML/XHTML Compatibility Authoring Guidelines]]
([TIME[2010-05-28 06:09:23 +09:00]] 版)
<http://dev.w3.org/cvsweb/~checkout~/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html?content-type=text/html;%20charset=utf-8>
[535] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
([TIME[2010-06-26 06:42:47 +09:00]] 版)
<http://www.w3.org/TR/2010/WD-html-polyglot-20100624/>
[536] [CITE[Bug 10889 – Content Model section should cite the Polyglot document for further advice]]
( ([TIME[2010-10-12 21:33:45 +09:00]] 版))
<http://www.w3.org/Bugs/Public/show_bug.cgi?id=10889>
[537] [CITE@en[Web Applications 1.0 r5610 ref the polyglot specFixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10889]]
( ([TIME[2010-10-12 18:17:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5609&to=5610>
[538] [CITE[IRC logs: freenode / #whatwg / 20101014]]
( ([TIME[2010-10-24 00:00:38 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101014>
[539] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
( ([TIME[2010-10-20 12:55:50 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-html-polyglot-20101019/>
[540] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
( ([TIME[2010-10-20 12:55:50 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-html-polyglot-20101019/>
[541] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
( ([TIME[2011-01-15 03:48:14 +09:00]] 版))
<http://www.w3.org/TR/2011/WD-html-polyglot-20110113/>
[542] [CITE@en[Notes on the draft polyglot document Polyglot document]]
( ([[Tim Berners-Lee]] 著, [TIME[2010-06-09 20:21:15 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-html/2010Jun/0225>
[543] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
( ([TIME[2011-05-26 01:45:56 +09:00]] 版))
<http://www.w3.org/TR/2011/WD-html-polyglot-20110525/>
[544] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
( ([TIME[2012-03-30 06:34:46 +09:00]] 版))
<http://www.w3.org/TR/2012/WD-html-polyglot-20120329/>
[545] [CITE[Web Application Description Language]]
( ([TIME[2009-09-10 03:59:24 +09:00]] 版))
<http://www.w3.org/Submission/2009/SUBM-wadl-20090831/#x3-80002.3>
[546] [CITE@en[tantek/log/2003/01]]
( ([[Tantek Çelik]] 著, [TIME[2006-05-02 00:37:27 +09:00]] 版))
<http://tantek.com/log/2003/01.html#L20030114t1345>
[547] [CITE@en[Polyglot Markup: HTML-Compatible XHTML Documents]]
( ([TIME[2012-10-25 03:57:58 +09:00]] 版))
<http://www.w3.org/TR/2012/WD-html-polyglot-20121025/>
[548] [CITE[IRC logs: freenode / #whatwg / 20121112]]
( ([TIME[2012-11-29 00:18:23 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20121112>
[549] [CITE[IRC logs: freenode / #whatwg / 20121207]]
( ([TIME[2012-12-16 15:20:55 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20121207>
[550] [CITE@en[Web Applications 1.0 r7646 Remove some entries that really aren't helping anyone.]]
( ([TIME[2013-01-24 05:00:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7645&to=7646>
[551] [CITE@en-US[Polyglot Markup: A robust profile of the HTML5 vocabulary]]
( ([TIME[2013-10-21 22:29:46 +09:00]] 版))
<http://www.w3.org/TR/2013/WD-html-polyglot-20131022/>
[552] いつのまにか <http://www.w3.org/TR/xhtml> が <http://www.w3.org/MarkUp/> へのリダイレクトになっています。
(/MarkUp/ には現 [[HTML WG]] へのリンクが追加されています。) [TIME[2013-11-28T04:41:04.400Z]]
[553] [CITE@en-US[Polyglot Markup: A robust profile of the HTML5 vocabulary]]
( ([TIME[2014-02-04 01:57:11 +09:00]] 版))
<http://www.w3.org/TR/2014/WD-html-polyglot-20140204/>
[554] [[HbbTV]] は [[XHTML]] の[[プロファイル]]を定義しています。
[[MIME型]]は [CODE(MIME)@en[[[application/vnd.hbbtv.xhtml+xml]]]] とされています。
[555] [CITE@en-US[Polyglot Markup: A robust profile of the HTML5 vocabulary]]
( ([TIME[2014-07-15 21:44:45 +09:00]] 版))
<http://www.w3.org/TR/html-polyglot/>
[556] [CITE@en[Bug 21818 – XHTML5: Permit <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>]]
( ([TIME[2014-08-20 00:36:05 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=21818>
[20] [CITE@en[XHTML in IE9 - IEBlog - Site Home - MSDN Blogs]]
([TIME[2015-07-07 11:17:42 +09:00]] 版)
<http://blogs.msdn.com/b/ie/archive/2010/11/01/xhtml-in-ie9.aspx>
[21] [CITE@en[1044332 – Stop treating XHTML as XML]]
([TIME[2015-07-07 11:23:14 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=1044332>