HTMLIsIndexElement

isindex 要素 (HTML)

[2] HTMLisindex 要素は、元々はその文書 (によって代表される資源) が検索可能であることを表していました。 その後フォームが開発され、使われなくなりました。

本項は歴史的事項を説明しています。本項の内容の一部または全部は、現在の状況とは異なるかもしれません。

(なお本項の内容の一部または全部は、互換性または歴史的連続性のために現在も有効な場合もあります。しかし新たに利用することは避けるべきです。)

目次

  1. 代替
  2. 仕様書
  3. 属性
  4. 構文解析
  5. input 要素の nameisindex
  6. 関連
  7. 歴史
    1. 誕生
    2. 変質
    3. 文脈
    4. HTML5 以前の実装
    5. isindex 要素 type 属性
    6. HTML5
    7. HTML5時代の実装
    8. 削除へ

代替#

[5] この要素HTML4非推奨とされた後、 HTML5 により廃止されました。

[105] 代わりに、 form 要素と input 要素を使って同じようなことが実現できます。

仕様書#

属性#

[4]

action%URI提出先
class(なし)[HTML 4] %coreattrs
dir書字方向[HTML 4] %i18n
href%URI提出先
idID(なし)固有識別子[HTML 4] %coreattrs
lang%LanguageCode(継承)自然言語[HTML 4] %i18n
xml:lang%LanguageCode(継承)自然言語W3C 勧告[XHTML 1]
prompt%Text[HTML 4] 非推奨
style%StyleSheet(なし)スタイル指定[HTML 4] %coreattrs
title%Text(なし)注釈的題[HTML 4] %coreattrs
typekhtml_isindex(なし)非標準WebKit

構文解析#

[38] isindex 要素は完全に廃止され、 Webブラウザーも未知の HTML要素と扱うようになりました。

[106] isindex 要素は歴史的にいろいろな形で実装されてきましたが、 現在の HTML Standard では form 要素とその子孫という形に構文解析器の時点で展開される 「マクロ」として定義されています。各 Webブラウザーの現行世代の構文解析器 (いわゆる HTML5構文解析器) もすべてそのように実装しています。

[107] 従って createElementXMLisindex 要素を作っても、 isindex としての機能は持ちません。

input 要素の nameisindex#

[39] かつてはコントロール名 isindex は特別扱いされていました。 現在は特殊な動作のない普通の値となっています。

[111] isindex 要素が展開された要素のひとつは input 要素で、 name 属性isindex となります。 これはフォーム提出の際に特別に扱われます (>>109)。それによって旧来の isindex 要素の動作がエミュレートされています。

#

[8] メッセージつきの例 HTML 4 17.8

<ISINDEX prompt="Enter your search phrase: ">

input を使って書き換えた例 HTML 4 17.8、改

<FORM action="..." method="get">
<P><LABEL>Enter your search phrase: <INPUT type="text"></LABEL></P>
</FORM>

但し、フォームと索引では提出方法が異なるので、 この2つの例は交換可能ではありません。

[18] WAISで検索する例:

<ISINDEX iPROMPT="Enter WAIS query:"
HREF="wais://net.bio.net/biologists-addresses">

関連#

[101] CGI には isindex 要素からの問い合わせのためのスクリプト命令行という機能がありました。

[102] isindex 要素が使われなくなり、そちらも使われなくなっています。

歴史#

誕生#

[40] HTML 1991

[41] Elements/isindex - HTML Wiki, , https://web.archive.org/web/20230216093940/https://www.w3.org/html/wiki/Elements/isindex

[43] HTML要素概説
要素名
isindex
技術史文献
>>42
出典

変質#

[6] 本来この要素は索引があって検索可能なことを表すだけで、 検索フォームは UA の機能に過ぎなかった (本文領域には表示せず、メニューから検索機能を呼出せるだけの UA もあった)]] のに、 いつの間にか文章の適当なところに配置できる簡易フォーム機能となってしまいました。 フォーム提出先 URI まで指定できるようになっています (HTML 4 にはその機能は入りませんでしたが)

HTML 4 に至っては、

This element creates a single-line text input control. HTML 4 17.8

などと定義しています。

[7] しかも、 head 要素が創設された時にそちらに収納されるはずのものであったにもかかわらず、 いつの間にか本文のどこにあっても良いことになっています。

ここまでして高機能化するほど使い道があるものではありませんし、 form が使いづらいというわけでもないのですが、 どうしてこうも拡張されてしまったのでしょうと思わずにはいられません。

[44] Notes on informal HTML-IG meeting 25 July 94 ( 版) http://www.w3.org/MarkUp/HTML-WG/940725-minutes.html

ISINDEX should not be allowed in the body of messages. (This has always been a bug encouraged by Mosaic's handling of if, but it should be done with a small form, and it is messy to allow it in two roles.)

[10] HTML 4 DTD の注釈 (参考) には single line prompt とあります。

[9] isindex の意味がよく規定されているのは基底URIHTTP である場合のみです。また、入力する文字列は Latin-1 に制限されます。 HTML 4 17.8

[1] WebTV では「属性なし」で、次のような例が載っています。

<ISINDEX "http://www.webtv.net/search">

(出典: isindex http://web.archive.org/web/20000601075627/developer.webtv.net/authoring/html/isindex.html#1082776)

こんなのは SGML ではないと思うんですがねぇ。

[122] ncsa-mosaic/CHANGES at master · alandipert/ncsa-mosaic ( ( 版)) https://github.com/alandipert/ncsa-mosaic/blob/master/CHANGES#L700

[123] ncsa-mosaic/CHANGES at master · alandipert/ncsa-mosaic ( ( 版)) https://github.com/alandipert/ncsa-mosaic/blob/master/CHANGES#L736

[124] ncsa-mosaic/libhtmlw/HTMLformat.c at master · alandipert/ncsa-mosaic ( ( 版)) https://github.com/alandipert/ncsa-mosaic/blob/master/libhtmlw/HTMLformat.c#L4710

[125] これらによると Mosaic では form が実装された時点で isindexform に展開される形になっていたようです。 更にコンパイル時オプションで提出ボタンつきのものも実装されていたようです (なぜそれが標準にならなかったのかは不明です)。

[146] WWW-Talk 1992: <ISINDEX> and anchor types ( ( 版)) http://1997.webhistory.org/www.lists/www-talk.1992/0080.html

[147] indexes as links rather than documents ( ( 版)) http://lists.w3.org/Archives/Public/www-talk/1992NovDec/0031.html

[148] ISINDEX on documents ( ( 版)) http://lists.w3.org/Archives/Public/www-talk/1992NovDec/0042.html

[149] Re: ISINDEX on documents ( ( 版)) http://lists.w3.org/Archives/Public/www-talk/1992NovDec/0044.html

[21] WWW-Talk Oct-Dec 1993: Mosaic2.0 and ISINDEX ( 版) http://1997.webhistory.org/www.lists/www-talk.1993q4/0493.html

[22] libwww-perl/gopher.pm at master · libwww-perl/libwww-perl ( 版) https://github.com/libwww-perl/libwww-perl/blob/master/lib/LWP/Protocol/gopher.pm#L89

文脈#

[12] isindex 要素型は元々の意味からすると head 内でのみ認められるべきでしたし、 何個あっても意味が変わらないので高々1個だけ認められるべきでした。 しかし、 isindex 要素の場所に入力欄を設けるという実装が行われるようになり、 文書のあらゆる場所に何個でも置けるように拡張されてしまいました。

[13] HTML 4 ではこの要素型を %block に分類しています。従って、 body 内の行内要素しか認められない場所以外ほとんどどこにでも書けます。

また、 DTD 内の引数実体 %head.content で高々1回記述できると規定しています。つまり、 head の子供としてどこにでも1回だけ指定できます。

[11] XHTML 1.0 互換性指針は、 head 内に複数の isindex を入れるのは互換性のため好ましくないとしています XHTML 1.0 C.6

XHTML 1.0DTD をよく見ると isindex%block; に含まれるのはそのままですが、 head については %head.misc; に移動していることがわかります。 XML内容模型の記述能力の限界により、 簡単のため定義の仕方が変わったようです。 これにより、 isindexhead 内であっても任意の回数使用できるようになりました。 互換性指針が言っているのはこの変更のことのようです。

[19] >>11 この変更についてBjoern Hoehrmannが問い質していますが、 Steven Pemberton>>11 のような説明をしています。 それに対してBjoern Hoehrmannは、DTDの変更は他にもあるのにどうしてこれだけ取り上げるのだとたずねていますが、 返答はありません。

HTML5 以前の実装#

[14] Firefox 1.5では、isindexタグおよびその中の属性指定がそのままDOM上の要素節点および属性節点として反映されます。表示上は

<hr>
prompt text<input type="text">
<hr>

のようになります (XBLではないようです)。

prompt textprompt属性値か、 なければ利用者界面と同じ言語の文章になります。 日本語の場合

これは検索可能なインデックスです。検索キーワードを入力してください:

になります。

isindexCSSを適用することは可能ですが、 hrのようなものinputのようなものには適用できないみたいです。 (名無しさん)

[15] innerHTMLにはisindex開始タグ (とあれば、属性指定) だけが現れます。 (名無しさん)

[16] Opera 8.5およびOpera 9 TP1では、isindex開始タグDOMにおいてisindex要素節点になり、その子供として

が作られます。

isindexにはCSSが適用され、 その子供も通常の方法でCSSによってレンダリングされるようです。

innerHTMLにはisindex開始タグ (とあれば、属性指定) のに、内容直列化したものが現れます。 (終了タグは現れません。) (名無しさん)

[17] WinIE 6では、isindex開始タグDOMグラフにおいてform要素節点と、 その子供節点列:

となります。属性は、

CSSによるレンダリング指定はDOM上の要素構造に対して適用され、 isindex要素への指定は適用されません。

innerHTMLDOM上の構造を直列化したものとなります。

[96] createElement で作った isindex 要素HTML文書に挿入した場合、

どのブラウザでも DOM 上は isindex 要素のままです。

[97] 普通に <isindex> 開始タグHTML文書に書くと Firefox 以外は複数の HTML 要素に展開した状態で DOM に現れますから、この結果は頷けます。

[98] XHTMLisindex 要素が含まれる場合、

DOM 上は

という感じです。

[99] >>98 Opera で挿入される要素

<isindex><hr/>This is a searchable index<br/><input xmlns="text" xml:lang="20"/><hr/></isindex>
のように属性がちょっとおかしいです。

isindex 要素 type 属性#

[92] WebKit は、 isindex 開始タグHTML文書中に現れると、 代わりに div 要素などを DOM に挿入しますが、その一部として、入力欄の部分には isindex 要素が挿入され、その type 属性khtml_isindex となります。

DOM 上の isindex 要素input type text のようにレンダリングされます。 少なくてもレンダリングに関しては、 type 属性の影響はないみたいです。
なお、 isindex 開始タグ中の属性DOMisindex 要素に設定されるのですが、 type 属性khtml_isindex に常になります。

HTML5#

[93] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=4023&to=4024

[94] Manual pages ( 版) http://costard.lbl.gov/cgi-bin/man/man2html

[95] IRC logs: freenode / #whatwg / 20100311 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100311#l-326

[100] HTML5 Revision Tracker ( 版) http://html5.org/tools/web-apps-tracker?from=4935&to=4936

[103] Intent to remove <isindex>. - Google グループ ( ( 版)) https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/14q_I06gwg8

[104] >>103 より

Google index files say <isindex> is used 0.000011% of pages as of December 2, 2013.

[136] [whatwg] isindex as a parser macro ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-February/067379.html

[137] [whatwg] <isindex prompt> ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-February/221248.html

[138] [whatwg] Form-associated elements and the parser ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-December/041719.html

[139] Web Applications 1.0 r3236 Remove the <p> from 'isindex' parsing. ( ( 版)) http://html5.org/r/3236

HTML5時代の実装#

[112] Blink では >>113 の500行目付近で構文解析が実装されています。 prompt の値は SearchableIndexIntroduction を参照しています。その実際の値は >>114 の各ロケールXML ファイルに "8141602879876242471" という値で含まれています。

[115] Gecko では >>116>>117IsIndexPromptWithSpaceprompt の値です。各ロケールのファイルが各ロケールのリポジトリの >>117 と同じディレクトリに入っています。

[120] >>119GeckoChromium の各言語のデータを JSON 化したものがあります。

[118] HTML Standardisindex の前後どちらにも文字列を挿入することを認めていますが、 BlinkGecko も前にしか挿入しないようです。 (各ロケールのデータがそうなっているだけでなく、 構文解析器に後ろ側に文字列を挿入するコードがありません。

[144] HTML5構文解析器では type 属性は無視されずに input 要素に設定されます。ですから input 要素の任意のフォーム制御子を使うことができます。

削除へ#

[121] IRC logs: freenode / #whatwg / 20140311 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20140311#l-429

[126] Issue 98743002: Count usage of the obsolete 'isindex' element. - Code Review ( ( 版)) https://codereview.chromium.org/98743002

[127] MFSA 2010-76: window.open と <isindex> 要素によるクローム特権昇格 ( ( 版)) http://www.mozilla-japan.org/security/announce/2010/mfsa2010-76.html

[128] Issue 96653004: Remove support for the obsolete <isindex> tag. - Code Review ( ( 版)) https://codereview.chromium.org/96653004/

[129] Issue 182843002: Drop isindex from HTMLTagNames. - Code Review ( ( 版)) https://codereview.chromium.org/182843002

[130] Issue 433 - chromium - WebKit should support ISINDEX as it is in the HTML 5 RFC - An open-source project to help move the web forward. - Google Project Hosting ( ( 版)) https://code.google.com/p/chromium/issues/detail?id=433

[131] Bug 7139 – Drop support for <isindex> ( ( 版)) https://bugs.webkit.org/show_bug.cgi?id=7139

[132] Bug 4574 – HTML parser does not put attributes on the <isindex> element ( ( 版)) https://bugs.webkit.org/show_bug.cgi?id=4574

[133] Bug 4828 – <form> element is created for <isindex> outside <form>; that's not correct ( ( 版)) https://bugs.webkit.org/show_bug.cgi?id=4828

[134] Bug 18415 – No DOM element created for <isindex> with no other tags in the document ( ( 版)) https://bugs.webkit.org/show_bug.cgi?id=18415

[135] HTMLIsIndexElement - Web API インターフェイス | MDN ( ( 版)) https://developer.mozilla.org/ja/docs/Web/API/HTMLIsIndexElement

[140] 609437 – (CVE-2010-3771) <isindex> doesn't CheckLoadURI ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=609437

[141] 3326 – ISINDEX element ignored ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=3326

[142] 666665 – Remove isindex content code ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=666665

[143] 611352 – Create a HTMLElement when createElement('isindex') is called and the html5 parser is enabled ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=611352

[145] Bug 26689 – Drop isindex? ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=26689

[150] IRC logs: freenode / #whatwg / 20140901 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20140901#l-339

[23] Bug 28326 – Remove isindex parsing logic ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=28326

in Microsoft's Project Spartan, we've followed Blink's lead for interop.

[24] Remove <isindex> and <input name=isindex> · whatwg/html@5c44abc ( 版) https://github.com/whatwg/html/commit/5c44abc734eb483f9a7ec79da5844d2fe63d9c3b

[25] 1266495 – Consider removing <isindex> from the parser and form submission ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=1266495

[26] 1266495 – Consider removing <isindex> from the parser and form submission ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=1266495

[27] Bug 7139 – Drop support for <isindex> ( 版) https://bugs.webkit.org/show_bug.cgi?id=7139

[28] Bug 4574 – HTML parser does not put attributes on the <isindex> element ( 版) https://bugs.webkit.org/show_bug.cgi?id=4574

[29] Bug 4828 – <form> element is created for <isindex> outside <form>; that's not correct ( 版) https://bugs.webkit.org/show_bug.cgi?id=4828

[30] Bug 18415 – No DOM element created for <isindex> with no other tags in the document ( 版) https://bugs.webkit.org/show_bug.cgi?id=18415

[31] Remove isindex handling from application/x-www-form-urlencoded · whatwg/url@c85fb5d ( 版) https://github.com/whatwg/url/commit/c85fb5d527f822e089aecc9207f077c6b886aed5

[32] Isindex () http://www.blooberry.com/indexdot/html/tagpages/i/isindex.htm

Netscape 6 Beta Warning: Support for this element was not added to Mozilla/Netscape 6 until Beta 3 - in Betas 1 and 2 this element was not supported at all.

[33] Isindex () http://www.blooberry.com/indexdot/html/tagpages/i/isindex.htm

The beta versions of Internet Explorer 4.0 did not support this element at all - the final version of IE 4.0, however, supported it again.

[34] ISINDEX () http://www.am.ics.keio.ac.jp/~wataru/WWW/CGI/isindex.html

<ISINDEX>$B%?%0$N;HMQNc$H$7$F!"

#!/bin/sh

echo "Content-type: text/html"

echo

echo "<HTML><HEAD>"

echo "<TITLE>test</TITLE>"

echo "<ISINDEX>"

echo "</HEAD>"

echo "<BODY>"

echo "<H1>$1<H1>"

echo "</BODY></HTML>"

[35] Make <input name=isindex> non-conforming (sideshowbarker著, ) https://github.com/whatwg/html/commit/1bbba21f381ef95f826986b7d17992bd8f82573b

[36] 1266495 - Consider removing <isindex> from the parser and form submission [tor 18914] () https://bugzilla.mozilla.org/show_bug.cgi?id=1266495

[37] <isindex> support has been dropped | Firefox Site Compatibility () https://www.fxsitecompat.com/en-CA/docs/2017/isindex-support-has-been-dropped/