[14] 媒体型名 application/xhtml+xml
は、 XHTML を表します。
application/xhtml+xml
と
text/html
などの使い分けに関する W3C
HTML WG の Working Group Note。本項は歴史的事項を説明しています。本項の内容の一部または全部は、現在の状況とは異なるかもしれません。
(なお本項の内容の一部または全部は、互換性または歴史的連続性のために現在も有効な場合もあります。しかし新たに利用することは避けるべきです。)
名前 | 値 | 既定値 | 意味 | 出典 |
charset | charset | (自動) | Charset | [RFC 3236] |
profile | URI参照 | (なし) | プロファイル | [RFC 3236] |
schema-location | URI 参照 | (なし) | プロファイル | [RFC 3236] になる前の I-D |
[8] Apache は AddDefaultCharset
していても
application/*
には
charset
パラメーターを与えてくれないから注意が必要。
[9] >>8 Apache が対応するまでは AddCharset
でも使って回避すべし (例: AddCharset iso-2022-jp .xhtml)。
[4] profile
パラメーターは、
XHTML の具体的にどんなものであるかを示すものです。
RFC 3236 の8節で定義されています。
古い I-D では schema-location
という名前でした。
しかし、 W3C の XHTML の仕様書でこのパラメーターの具体的な値を規定したものは1つもありません。 (提案だけしといて随分のんきなもんです。)
[5] RFC 3236 の例から、 XHTML Basic では http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd を使うことが分かります。
これから類推するなら、 W3C XHTML ではその DTD の最新版 (日付の入っていない) URI を使えばよいのでしょう。
[6] もっとも、 RFC 3236 は用途を内容折衝に限定しており、 しかも過渡期のものだと言っていますから、 わざわざ使う必要はないでしょう。
だけど、 html
要素の version
属性にしろ head
要素の
profile
属性にしろ、
この手のものはどうして役に立たん (役に立つように使われない)
のですかね?
[7] ところで、 head
要素の profile
属性は空白で区切って複数の URI 参照を指定できました。
(ただしその意味は将来のために予約。) こちらの profile
引数ではどうなんでしょうかね?
[10] http://pc2.2ch.net/test/read.cgi/hp/1028659057/110-129
[11] XHTML-Print http://www.pwg.org/xhtml-print/HTML-Version/XHTML-Print.html という小型印刷機用の XHTML 1 仕様では、 http://www.xhtml-print.org/xhtml-print/xhtml-print10.dtd を使っています。
application/xhtml+xml;profile="http://www.wapforum.org/xhtml"
[3] RFC 3236 urn:ietf:rfc:3236:
application/xhtml+xml
を規定し、 IANA
に登録する情報提供 RFC。
[38] XHTML+RDFa 1.0 では application/xhtml+xml
を使うべきと規定されていました。
[16] XHTML 文書は XML 文書ですから、
application/xml
や text/xml
も使えます。
(ただし、 text/xml
が適当なことは、 text/*
の定義上、ほとんどあり得ないでしょう。)
特に意識してそう書かれた XHTML 1 文書は従来の意味での
HTML 文書でもあります (HTML とも解釈できます) から、
text/html
が使えることもあります。
application/xhtml+xml
とこれらの媒体型の使い分けに関しては、
>>1-2 の W3C Note を参照してください。
[12] XHTML 1 の印刷機向けプロファイルである
XHTML-Print http://www.pwg.org/xhtml-print/HTML-Version/XHTML-Print.html
は、
application/vnd.pwg-xhtml-print+xml
という媒体型を使っています。
[17] XHTML 文書は SGML 文書ですから、
application/sgml
や text/sgml
を使うことも、できなくはありません。
[13] W3C HTML WG は同時に text/xhtml+xml
も登録したかったらしいですが、 ietf-xml-mime WG の猛烈な反対で実現しなかったんだそうです。 (MIME の text/* の近視眼的定義のせい。しかし MIME の出来の悪さは色んなところに尾を引くなあ。。。)
[18]
>>12 W3C は、 application/vnd.pwg-xhtml-print+xml
は非推奨で、 application/xhtml+xml
を使うようにと言っています。
XHTML-Print http://www.w3.org/TR/2004/CR-xhtml-print-20040120/#s_conformance
application/xhtml+xml
の文書があったら紹介する#✎[36] MathML のために使ってるのは MathML in the wild を参照。 RDFa を使っているものは RDFa の項を参照。
[54] 一部のガラケー向けには、MIME型が機能スイッチとなっているため、
application/xhtml+xml
で文書を提供することがありました。
User-Agent:
により text/html
と切り替えるのが普通でした。application/xhtml+xml
であるからといって、
整形式とは限りません。[32] POWDER - Protocol for Web Description Resources: Draft HTML meta data profile ( 版) http://www.w3.org/2007/11/powder-profile: XHTML 1.0 移行用DTD
[33] ちょっとしたメモ - RSS 1.0のchannel要素のrdf:about ( 版) http://www.kanzaki.com/memo/2004/02/05-1 XHTML 1.0 厳密DTD
2008年11月現在、escape されていない <
があるため、非整形式。
昔は普通に見れたような気がするので、元々は text/html
だったのですかね?
現在、未だ修正されていません。誰も (著者すらも) 見てないってことですかね?
[34] 第 7 回アルゴリズムイントロダクション輪講会資料: Days on the Moon ( 版) http://nanto.asablo.jp/blog/2008/12/04/3992000
[35] もずはっく日記目次 - WebStudio ( 版) http://www.d-toybox.com/studio/weblog/index.xhtml XHTML 1.0
text/html
。[37] And with all that | Burningbird ( 版) http://realtech.burningbird.net/and-all
[47] Mozilla position: Requirements for a framework for mixed-namespace documents ( 版) http://dbaron.org/cdi-req/
[57] 新日本書紀 Kindle版第一巻 ( 版) http://history-jp.net/right-01.xhtml
[58] JabRefにおけるXMPメタデータ サポート () http://jabref.sourceforge.net/help/ja/XMPHelp.php
[19]
Gecko では、 application/xhtml+xml
な実体の根要素に xmlns
属性がないと
(つまり
になっていないと) スタイル・シートなしの XML文書として処理するようです
(xhtml1:html
xml-stylesheet
処理指令があれば、それによる)。
文書型宣言があっても Gecko は基本的には処理しないので、
xmlns
属性がどうしても必要になります。
参考: Test about xmlns http://www.fairyland.to/soft/browser/xmlns-test
(名無しさん [sage] 2005-05-18 07:55:16 +00:00)
[20]
最近はGoogleもapplication/xhtml+xml
に一応対応したみたいですねぇ。
検索対象に入っているみたいですし、キャッシュを出させると怪しげな物理マーク (font
とか) に変換されたのが出てきます。
名前空間URIは見ていないようで、XHTML 2でもXHTML 1的に解釈したらしい変換結果になっています。。。 (名無しさん 2006-01-02 10:50:05 +00:00)
[21]
>>20 application/xhtml+xml
に限らず、XMLならなんでもそんな感じのようです。。。
(名無しさん 2006-01-03 06:39:43 +00:00)
[22] Mozilla Web Author FAQ http://www.mozilla.org/docs/web-developer/faq.html#accept
The preference for application/xhtml+xml was added to the Accept header in order to enable the serving of MathML to both Mozilla and IE with Apache without scripting back when the MathPlayer plug-in for IE did not handle application/xhtml+xml.
(名無しさん)
[23]
Bug 9677 - [S60] application/xhtml+xml doesn't get XML treatment (2007-01-24 21:54:50 +09:00
版) http://bugs.webkit.org/show_bug.cgi?id=9677
(名無しさん)
[24]
Google (2007-01-24 21:55:56 +09:00
版) http://www.google.com/xhtml
Firefox 1.5 からアクセスすると、
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="Cache-Control" content="no-cache"/ (略)
という内容で text/html
でした。
(名無しさん 2007-01-24 12:57:19 +00:00)
[25]
Getting IE to accept application/xhtml+xml (Steven Pemberton 著, 2007-04-19 19:40:00 +09:00
版) http://lists.w3.org/Archives/Public/public-xhtml2/2007Apr/0015.html
(名無しさん)
[26]
IEがapplication/xhtml+xmlに対応しない理由:メモランダム (2007-05-07 07:37:40 +09:00
版) http://mynotes.jp/blog/2007/05/why_ie_doesnt_support_application_xhtml_plus_xml
(名無しさん 2007-06-09 16:59:58 +00:00)
[27]
XML - Extensible Markup Language (2007-03-10 11:04:55 +09:00
版) http://msugai.fc2web.com/web/XHTML11/xml.html
http-equiv
での使用を紹介した例。
この文書自体でもそれを使っている。
XHTML 1.1 文書。でも
Content-Type
は text/html
。
(名無しさん)
[28]
ココログナビ (2007-06-11 00:12:30 +09:00
版) http://m-cocolog.jp/m/index.xhtml
application/xhtml+xml
。
それはいいのだが、
<?xml version="1.0" encoding="Shift_JIS"?> <!DOCTYPE html PUBLIC "-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/2.0) 1.0//EN" "i-xhtml_4ja_10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <head> <meta http-equiv="Cache-Control" content="no-cache" /> <meta name="description" content="ココログナビ" /> <meta name="keywords" content="ココログナビ" /> <meta http-equiv="ContentType" content="application/xhtml+xml" />
こんな文書型宣言なもんだから、 Firefox
1.5 は
が現れたところで定義されていない実体が使用されています。
といって表示してくれない。
それにしても
<meta http-equiv="ContentType" content="application/xhtml+xml" />
はいったいなにがしたいのか。 (名無しさん)
[29]
>>28 閉じられていない img
要素がいくつかある。乙。
(名無しさん)
[30]
Mai multe produse Google (2008-01-09 05:50:36 +09:00
版)
(Served as text/html
)
http://www.google.ro/intl/ro/options/
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
(名無しさん)
[31]
HEMiDEMi - 黑米共享書籤 (HEMiDEMi 著, 版) http://www.hemidemi.com/member/signin_form?_url=%2Fuser_bookmark%2Fnew
(text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>HEMiDEMi - 黑米共享書籤</title> <!-- Meta Tags --> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
(名無しさん)
[39] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=3551&to=3552
[40] X3DOM 1.0 - home ( 版) http://www.x3dom.org/?page_id=5
[41] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=4458&to=4459
[42] [ietf-types] Update to application/xhtml+xml media type ( ( 版)) http://www.ietf.org/mail-archive/web/ietf-types/current/msg01709.html
[43] Karl Dubost - Wrong To Be Right - application/xhtml+xml ( ( 版)) http://my.opera.com/karlcow/blog/2011/03/03/wrong-to-be-right-with-xhtml
[45] Web Applications 1.0 r3552 Include MIME type registration sections. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=3551&to=3552
[49] 1180623 – Stop choking at badly formatted application/xhtml+xml documents ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=1180623
[50] Issue 1347: gmail.com - mobile site is not usable - webcompat.com ( 版) https://webcompat.com/issues/1347
[51] 1036987 – XML Parsing error: not well-formed when trying to reply to an email through the Gmail web interface on Firefox OS ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=1036987
Over the last couple of years, we've contacted all sites we found are breaking like this, and asked Microsoft to fix the ASP.NET sniffing problem, which they've done. However, as the rollout of this update takes time, there are still a number of sites broken, and it seems like this situation will be with us for quite some time to come.
Hence, we've decided to stop throwing draconian XML parsing failed error messages, and instead, attempt to reparse the document automatically as HTML. Instead of showing an error message in the browser, it's now dumped to the console, so as a developer, you can still find XML parsing error warnings in Opera Dragonfly and the Error Console if you want to.
# [11:38] <annevk> "[T]he reviewer for my registration of application/xhtml+xml in 2014 objected because I was not referring to XHTML 2.0." Thank you darobin, that's comedy gold
# [11:39] <darobin> annevk: :)
# [11:39] <darobin> yeah, MikeSmith and I laughed about that for a while
# [11:39] <darobin> shame the stuff is not public
# [11:39] <darobin> PLH had to stop me from basically strangling them