| 1 |
apache |
1.4 |
#en
|
| 2 |
|
|
<span class=secno>9.2 </span>Parsing HTML documents
|
| 3 |
|
|
#ja
|
| 4 |
|
|
<span class=secno>9.2 </span>HTML 文書の構文解析
|
| 5 |
|
|
|
| 6 |
|
|
#en
|
| 7 |
|
|
<em>This section only applies to user agents, data mining tools, and
|
| 8 |
|
|
conformance checkers.</em>
|
| 9 |
|
|
#ja
|
| 10 |
|
|
<em>この節は利用者エージェント、データ・マイニング・ツール、
|
| 11 |
|
|
適合性検査器のみに適用されます。</em>
|
| 12 |
|
|
|
| 13 |
|
|
#en
|
| 14 |
|
|
The rules for parsing <a href="#xml-documents">XML documents</a> (and
|
| 15 |
|
|
thus <a href="#xhtml5">XHTML</a> documents) into DOM trees are covered by
|
| 16 |
|
|
the XML and Namespaces in XML specifications, and are out of scope of this
|
| 17 |
|
|
specification. <a href="#refsXML">[XML]</a> <a
|
| 18 |
|
|
href="#refsXMLNS">[XMLNS]</a> <!-- XXX refs -->
|
| 19 |
|
|
#ja
|
| 20 |
|
|
<a href="#xml-documents">XML 文書</a> (や <a href="#xhtml5">XHTML</a> 文書)
|
| 21 |
|
|
を構文解析して DOM 木を得るための規則は XML や XML 名前空間の仕様書で扱われており、
|
| 22 |
|
|
この仕様書の適用範囲外です。 <a href="#refsXML">[XML]</a> <a
|
| 23 |
|
|
|
| 24 |
|
|
#en
|
| 25 |
|
|
For <a href="#html-">HTML documents</a>, user agents must use the
|
| 26 |
|
|
parsing rules described in this section to generate the DOM trees.
|
| 27 |
|
|
Together, these rules define what is referred to as the <dfn
|
| 28 |
|
|
id=html-0>HTML parser</dfn>.
|
| 29 |
|
|
#ja
|
| 30 |
|
|
<a href="#html-">HTML 文書</a>については、利用者エージェントは、 DOM
|
| 31 |
|
|
木を生成するためにこの節で説明する構文解析規則を使用しなければ[[MUST:なりません]]。
|
| 32 |
|
|
また、この規則は<dfn
|
| 33 |
|
|
id=html-0>HTML 構文解析器</dfn>と呼ばれるものを定義します。
|
| 34 |
|
|
|
| 35 |
|
|
#en
|
| 36 |
|
|
While the HTML form of HTML5 bears a close resemblance to SGML and XML,
|
| 37 |
|
|
it is a separate language with its own parsing rules.
|
| 38 |
|
|
#ja
|
| 39 |
|
|
HTML5 の HTML 形式は SGML や XML によく似ていますが、
|
| 40 |
|
|
独自の構文解析規則を持つ別の言語です。
|
| 41 |
|
|
|
| 42 |
|
|
#en
|
| 43 |
|
|
Some earlier versions of HTML (in particular from HTML2 to HTML4) were
|
| 44 |
|
|
based on SGML and used SGML parsing rules. However, few (if any) web
|
| 45 |
|
|
browsers ever implemented true SGML parsing for HTML documents; the only
|
| 46 |
|
|
user agents to strictly handle HTML as an SGML application have
|
| 47 |
|
|
historically been validators. The resulting confusion — with
|
| 48 |
|
|
validators claiming documents to have one representation while widely
|
| 49 |
|
|
deployed Web browsers interoperably implemented a different
|
| 50 |
|
|
representation — has wasted decades of productivity. This version
|
| 51 |
|
|
of HTML thus returns to a non-SGML basis.
|
| 52 |
|
|
#ja
|
| 53 |
|
|
以前のいくつかの版の HTML (特に HTML2 から HTML4 まで) は SGML
|
| 54 |
|
|
に基づき、 SGML の構文解析規則を用いていました。しかし、 HTML
|
| 55 |
|
|
文書用に真の SGML 構文解析を実装していたウェブ・ブラウザは (あったとしても)
|
| 56 |
|
|
皆無に近い数でした。 HTML を厳密に SGML 応用として扱う唯一の利用者エージェントは歴史的に妥当性検証器だけでした。
|
| 57 |
|
|
その結果、妥当性検査器は文書がある形式であることを要求し、
|
| 58 |
|
|
一方で広く実用されている Web ブラウザはそれとは異なる形式を相互運用可能な形で実装するという混乱が生じ、
|
| 59 |
|
|
生産性を大きく低下させています。
|
| 60 |
|
|
ですので、この版の HTML は非 SGML ベースに回帰します。
|
| 61 |
|
|
|
| 62 |
|
|
#en
|
| 63 |
|
|
Authors interested in using SGML tools in their authoring pipeline are
|
| 64 |
|
|
encouraged to use XML tools and the XML serialization of HTML5.
|
| 65 |
|
|
#ja
|
| 66 |
|
|
文書準備の過程で SGML ツールを使いたいと考える著者には、
|
| 67 |
|
|
XML ツールと HTML5 の XML 直列化を用いることをお勧めします。
|
| 68 |
|
|
|
| 69 |
|
|
#en
|
| 70 |
|
|
This specification defines the parsing rules for HTML documents, whether
|
| 71 |
|
|
they are syntactically correct or not. Certain points in the parsing
|
| 72 |
|
|
algorithm are said to be <dfn id=parse2 title="parse error">parse
|
| 73 |
|
|
errors</dfn>. The error handling for parse errors is well-defined: user
|
| 74 |
|
|
agents must either act as described below when encountering such problems,
|
| 75 |
|
|
or must abort processing at the first error that they encounter for which
|
| 76 |
|
|
they do not wish to apply the rules described below.
|
| 77 |
|
|
#ja
|
| 78 |
|
|
この仕様書は、構文的に正しいか否かに関わらず HTML
|
| 79 |
|
|
文書を構文解析する規則を定義します。構文解析算法中のいくつかの箇所は<dfn id=parse2 title="parse error">構文解析誤り</dfn>であるとしています。
|
| 80 |
|
|
構文解析誤りの処理は明確に定義します。利用者エージェントは、
|
| 81 |
|
|
そのような問題に遭遇したときに後述のように動作するか、または後述の規則を適用することを望まないような誤りにはじめて遭遇した箇所で処理を停止しなければ[[MUST:なりません]]。
|
| 82 |
|
|
|
| 83 |
|
|
#en
|
| 84 |
|
|
Conformance checkers must report at least one parse error condition to
|
| 85 |
|
|
the user if one or more parse error conditions exist in the document and
|
| 86 |
|
|
must not report parse error conditions if none exist in the document.
|
| 87 |
|
|
Conformance checkers may report more than one parse error condition if
|
| 88 |
|
|
more than one parse error conditions exist in the document. Conformance
|
| 89 |
|
|
checkers are not required to recover from parse errors.
|
| 90 |
|
|
#ja
|
| 91 |
|
|
適合性検査器は、文書中に1つ以上の構文解析誤り条件が存在する場合、利用者に最低1つの構文解析誤り条件を報告しなければ[[MUST:ならず]]、
|
| 92 |
|
|
文書に誤りが存在しない場合、構文解析誤り条件を報告しては[[MUST NOT:なりません]]。
|
| 93 |
|
|
適合性検査器は、文書中に複数の構文解析誤り条件が存在する場合、
|
| 94 |
|
|
複数の構文解析誤り条件を報告して[[MAY:構いません]]。
|
| 95 |
|
|
適合性検査器は構文解析誤りから回復することを[[REQUIRED:要求]]されません。
|
| 96 |
|
|
|
| 97 |
|
|
#en
|
| 98 |
|
|
Parse errors are only errors with the <em>syntax</em> of
|
| 99 |
|
|
HTML. In addition to checking for parse errors, conformance checkers will
|
| 100 |
|
|
also verify that the document obeys all the other conformance requirements
|
| 101 |
|
|
described in this specification.
|
| 102 |
|
|
#ja
|
| 103 |
|
|
構文解析誤りは、 HTML の<em>構文</em>の誤りに過ぎません。
|
| 104 |
|
|
適合性検査器は、構文解析誤りの検査に加え、
|
| 105 |
|
|
文書がこの仕様書で説明されている他の適合性要件に従っているかも検査することになります。
|
| 106 |
|
|
|
| 107 |
|
|
|
| 108 |
|
|
|
| 109 |
apache |
1.5 |
#pattern
|
| 110 |
|
|
<span class=secno>* </span>Parse state
|
| 111 |
|
|
#ja
|
| 112 |
|
|
<span class=secno>$1 </span>構文解析状態
|
| 113 |
|
|
|
| 114 |
|
|
#pattern
|
| 115 |
|
|
<span class=secno>* </span>The insertion mode
|
| 116 |
|
|
#ja
|
| 117 |
|
|
<span class=secno>$1 </span>挿入モード
|
| 118 |
|
|
|
| 119 |
|
|
#en
|
| 120 |
|
|
Initially the <span>insertion mode</span> is "<a href="#initial"
|
| 121 |
|
|
title="insertion mode: initial">initial</a>". It can change to "<a
|
| 122 |
|
|
href="#before4" title="insertion mode: before html">before html</a>", "<a
|
| 123 |
|
|
href="#before5" title="insertion mode: before head">before head</a>", "<a
|
| 124 |
|
|
href="#in-head" title="insertion mode: in head">in head</a>", "<a
|
| 125 |
|
|
href="#in-head0" title="insertion mode: in head noscript">in head
|
| 126 |
|
|
noscript</a>", "<a href="#after4" title="insertion mode: after head">after
|
| 127 |
|
|
head</a>", "<a href="#in-body" title="insertion mode: in body">in
|
| 128 |
|
|
body</a>", "<a href="#in-table" title="insertion mode: in table">in
|
| 129 |
|
|
table</a>", "<a href="#in-caption" title="insertion mode: in caption">in
|
| 130 |
|
|
caption</a>", "<a href="#in-column" title="insertion mode: in column
|
| 131 |
|
|
group">in column group</a>", "<a href="#in-table0" title="insertion mode:
|
| 132 |
|
|
in table body">in table body</a>", "<a href="#in-row" title="insertion
|
| 133 |
|
|
mode: in row">in row</a>", "<a href="#in-cell" title="insertion mode: in
|
| 134 |
|
|
cell">in cell</a>", "<a href="#in-select" title="insertion mode: in
|
| 135 |
|
|
select">in select</a>", "<a href="#in-select0" title="insertion mode: in
|
| 136 |
|
|
select in table">in select in table</a>", "<a href="#in-foreign"
|
| 137 |
|
|
title="insertion mode: in foreign content">in foreign content</a>", "<a
|
| 138 |
|
|
href="#after5" title="insertion mode: after body">after body</a>", "<a
|
| 139 |
|
|
href="#in-frameset" title="insertion mode: in frameset">in frameset</a>",
|
| 140 |
|
|
"<a href="#after6" title="insertion mode: after frameset">after
|
| 141 |
|
|
frameset</a>", "<a href="#after7" title="insertion mode: after after
|
| 142 |
|
|
body">after after body</a>", and "<a href="#after8" title="insertion mode:
|
| 143 |
|
|
after after frameset">after after frameset</a>" during the course of the
|
| 144 |
|
|
parsing, as described in the <a href="#tree-construction0">tree
|
| 145 |
|
|
construction</a> stage. The insertion mode affects how tokens are
|
| 146 |
|
|
processed and whether CDATA blocks are supported.
|
| 147 |
|
|
#ja
|
| 148 |
|
|
はじめ、<span>挿入モード</span>は "<a href="#initial"
|
| 149 |
|
|
title="insertion mode: initial">initial</a>" です。挿入モードは、
|
| 150 |
|
|
構文解析の過程で、<a href="#tree-construction0">木構築</a>期で説明するように、
|
| 151 |
|
|
"<a
|
| 152 |
|
|
href="#before4" title="insertion mode: before html">before html</a>", "<a
|
| 153 |
|
|
href="#before5" title="insertion mode: before head">before head</a>", "<a
|
| 154 |
|
|
href="#in-head" title="insertion mode: in head">in head</a>", "<a
|
| 155 |
|
|
href="#in-head0" title="insertion mode: in head noscript">in head
|
| 156 |
|
|
noscript</a>", "<a href="#after4" title="insertion mode: after head">after
|
| 157 |
|
|
head</a>", "<a href="#in-body" title="insertion mode: in body">in
|
| 158 |
|
|
body</a>", "<a href="#in-table" title="insertion mode: in table">in
|
| 159 |
|
|
table</a>", "<a href="#in-caption" title="insertion mode: in caption">in
|
| 160 |
|
|
caption</a>", "<a href="#in-column" title="insertion mode: in column
|
| 161 |
|
|
group">in column group</a>", "<a href="#in-table0" title="insertion mode:
|
| 162 |
|
|
in table body">in table body</a>", "<a href="#in-row" title="insertion
|
| 163 |
|
|
mode: in row">in row</a>", "<a href="#in-cell" title="insertion mode: in
|
| 164 |
|
|
cell">in cell</a>", "<a href="#in-select" title="insertion mode: in
|
| 165 |
|
|
select">in select</a>", "<a href="#in-select0" title="insertion mode: in
|
| 166 |
|
|
select in table">in select in table</a>", "<a href="#in-foreign"
|
| 167 |
|
|
title="insertion mode: in foreign content">in foreign content</a>", "<a
|
| 168 |
|
|
href="#after5" title="insertion mode: after body">after body</a>", "<a
|
| 169 |
|
|
href="#in-frameset" title="insertion mode: in frameset">in frameset</a>",
|
| 170 |
|
|
"<a href="#after6" title="insertion mode: after frameset">after
|
| 171 |
|
|
frameset</a>", "<a href="#after7" title="insertion mode: after after
|
| 172 |
|
|
body">after after body</a>", "<a href="#after8" title="insertion mode:
|
| 173 |
|
|
after after frameset">after after frameset</a>"
|
| 174 |
|
|
に変わることができます。挿入モードは、字句がどう処理されるか、 CDATA
|
| 175 |
|
|
ブロックに対応するかどうかに影響します。
|
| 176 |
|
|
|
| 177 |
|
|
#en
|
| 178 |
|
|
Seven of these modes, namely "<a href="#in-head" title="insertion mode:
|
| 179 |
|
|
in head">in head</a>", "<a href="#in-body" title="insertion mode: in
|
| 180 |
|
|
body">in body</a>", "<a href="#in-table" title="insertion mode: in
|
| 181 |
|
|
table">in table</a>", "<a href="#in-table0" title="insertion mode: in
|
| 182 |
|
|
table body">in table body</a>", "<a href="#in-row" title="insertion mode:
|
| 183 |
|
|
in row">in row</a>", "<a href="#in-cell" title="insertion mode: in
|
| 184 |
|
|
cell">in cell</a>", and "<a href="#in-select" title="insertion mode: in
|
| 185 |
|
|
select">in select</a>", are special, in that the other modes defer to them
|
| 186 |
|
|
at various times. When the algorithm below says that the user agent is to
|
| 187 |
|
|
do something "<dfn id=using8>using the rules for</dfn> the <var
|
| 188 |
|
|
title="">m</var> insertion mode", where <var title="">m</var> is one of
|
| 189 |
|
|
these modes, the user agent must use the rules described under that
|
| 190 |
|
|
<span>insertion mode</span>'s section, but must leave the <span>insertion
|
| 191 |
|
|
mode</span> unchanged (unless the rules in that section themselves switch
|
| 192 |
|
|
the <span>insertion mode</span>).
|
| 193 |
|
|
#ja
|
| 194 |
|
|
挿入モードのうちの7つ、"<a href="#in-head" title="insertion mode:
|
| 195 |
|
|
in head">in head</a>", "<a href="#in-body" title="insertion mode: in
|
| 196 |
|
|
body">in body</a>", "<a href="#in-table" title="insertion mode: in
|
| 197 |
|
|
table">in table</a>", "<a href="#in-table0" title="insertion mode: in
|
| 198 |
|
|
table body">in table body</a>", "<a href="#in-row" title="insertion mode:
|
| 199 |
|
|
in row">in row</a>", "<a href="#in-cell" title="insertion mode: in
|
| 200 |
|
|
cell">in cell</a>", "<a href="#in-select" title="insertion mode: in
|
| 201 |
|
|
select">in select</a>" は特別で、他のモードが数箇所でこれらのモードに委ねています。
|
| 202 |
|
|
後述の算法が利用者エージェントは何かを「<var
|
| 203 |
|
|
title="">m</var> 挿入モードの<dfn id=using8>規則を用いて</dfn>」
|
| 204 |
|
|
(<var title="">m</var> はこれらのモードのいずれか。) 行うと言っている時は、
|
| 205 |
|
|
利用者エージェントは、当該挿入モードの節で説明されている規則を用いなければ[[MUST:なりません]]が、
|
| 206 |
|
|
挿入モードは変更しないでおかなければ[[MUST:なりません]] (その節の規則自体が挿入モードを切り替える場合を除きます)。
|
| 207 |
|
|
|
| 208 |
|
|
#en
|
| 209 |
|
|
When the insertion mode is switched to "<a href="#in-foreign"
|
| 210 |
|
|
title="insertion mode: in foreign content">in foreign content</a>", the
|
| 211 |
|
|
<dfn id=secondary1>secondary insertion mode</dfn> is also set. This
|
| 212 |
|
|
secondary mode is used within the rules for the "<a href="#in-foreign"
|
| 213 |
|
|
title="insertion mode: in foreign content">in foreign content</a>" mode to
|
| 214 |
|
|
handle HTML (i.e. not foreign) content.
|
| 215 |
|
|
#ja
|
| 216 |
|
|
挿入モードが "<a href="#in-foreign"
|
| 217 |
|
|
title="insertion mode: in foreign content">in foreign content</a>"
|
| 218 |
|
|
に切り替えられる時には、<dfn id=secondary1>二次挿入モード</dfn>も設定されます。
|
| 219 |
|
|
この二次モードは、 "<a href="#in-foreign"
|
| 220 |
|
|
title="insertion mode: in foreign content">in foreign content</a>"
|
| 221 |
|
|
モードの規則の中で HTML (つまり、異言語でない) 内容を取り扱う際に使用します。
|
| 222 |
|
|
|
| 223 |
|
|
#en
|
| 224 |
|
|
When the steps below require the UA to <dfn id=reset>reset the insertion
|
| 225 |
|
|
mode appropriately</dfn>, it means the UA must follow these steps:
|
| 226 |
|
|
#ja
|
| 227 |
|
|
後述の段階が利用者エージェントに<dfn id=reset>挿入モードを適切に再設定する</dfn>ことを要求する場合、
|
| 228 |
|
|
利用者エージェントは次の段階に従わなければ[[MUST:ならない]]ことを意味しています。
|
| 229 |
|
|
|
| 230 |
|
|
#pattern
|
| 231 |
|
|
Let * be false.
|
| 232 |
|
|
#ja
|
| 233 |
|
|
$1 を偽とします。
|
| 234 |
|
|
|
| 235 |
|
|
#en
|
| 236 |
|
|
Let <var title="">node</var> be the last node in the <a
|
| 237 |
|
|
href="#stack">stack of open elements</a>.
|
| 238 |
|
|
#ja
|
| 239 |
|
|
<var title="">node</var> を<a
|
| 240 |
|
|
href="#stack">開いている要素のスタック</a>の最後の節点とします。
|
| 241 |
|
|
|
| 242 |
|
|
#en
|
| 243 |
|
|
If <var title="">node</var> is the first node in the stack of open
|
| 244 |
|
|
elements, then set <var title="">last</var> to true and set <var
|
| 245 |
|
|
title="">node</var> to the <var title="">context</var> element. (<a
|
| 246 |
|
|
href="#fragment">fragment case</a>)
|
| 247 |
|
|
#ja
|
| 248 |
|
|
<var title="">node</var> が開いている要素のスタックの最初の節点の場合、
|
| 249 |
|
|
<var title="">last</var> を真に設定し、 <var
|
| 250 |
|
|
title="">node</var> を <var title="">context</var> 要素に設定します。
|
| 251 |
|
|
(<a
|
| 252 |
|
|
href="#fragment">素片の場合</a>)
|
| 253 |
|
|
|
| 254 |
apache |
1.6 |
#pattern
|
| 255 |
|
|
If <var title="">node</var> is a * element, then
|
| 256 |
|
|
switch the <span>insertion mode</span> to "*" and abort these steps.
|
| 257 |
apache |
1.5 |
(<a href="#fragment">fragment case</a>)
|
| 258 |
|
|
#ja
|
| 259 |
apache |
1.6 |
<var title="">node</var> が $1 要素の場合、挿入モードを "$2" に切り替え、
|
| 260 |
apache |
1.5 |
これらの段階を停止します。
|
| 261 |
|
|
(<a
|
| 262 |
|
|
href="#fragment">素片の場合</a>)
|
| 263 |
|
|
|
| 264 |
|
|
#pattern
|
| 265 |
|
|
If <var title="">node</var> is a * element, then
|
| 266 |
|
|
switch the <span>insertion mode</span> to "*" and abort these steps.
|
| 267 |
|
|
#ja
|
| 268 |
|
|
<var title="">node</var> が $1
|
| 269 |
|
|
要素の場合、挿入モードを "$2" に切り替え、
|
| 270 |
|
|
これらの段階を停止します。
|
| 271 |
|
|
|
| 272 |
|
|
#en
|
| 273 |
apache |
1.6 |
If <var title="">node</var> is a <code><a href="#td">td</a></code> or
|
| 274 |
|
|
<code><a href="#th">th</a></code> element and <var title="">last</var> is
|
| 275 |
|
|
false, then switch the <span>insertion mode</span> to "<a href="#in-cell" title="insertion mode: in cell">in cell</a>" and abort these steps.
|
| 276 |
|
|
#ja
|
| 277 |
|
|
<var title="">node</var> が <code><a href="#td">td</a></code> 要素か
|
| 278 |
|
|
<code><a href="#th">th</a></code> 要素の場合で <var title="">last</var>
|
| 279 |
|
|
が偽の場合、挿入モードを "<a href="#in-cell" title="insertion mode: in cell">in cell</a>" に切り替え、これらの段階を停止します。
|
| 280 |
|
|
|
| 281 |
|
|
#en
|
| 282 |
apache |
1.5 |
If <var title="">node</var> is an element from the <a
|
| 283 |
|
|
href="#mathml0">MathML
|
| 284 |
|
|
namespace</a><!--XXXSVG or the <span>SVG namespace</span>-->, then switch
|
| 285 |
|
|
the <span>insertion mode</span> to "<a href="#in-foreign"
|
| 286 |
|
|
title="insertion mode: in foreign content">in foreign content</a>", let
|
| 287 |
|
|
the <a href="#secondary1">secondary insertion mode</a> be "<a
|
| 288 |
|
|
href="#in-body" title="insertion mode: in body">in body</a>", and abort
|
| 289 |
|
|
these steps.
|
| 290 |
|
|
#ja
|
| 291 |
|
|
<var title="">node</var> が <a
|
| 292 |
|
|
href="#mathml0">MathML
|
| 293 |
|
|
名前空間</a>の要素の場合、挿入モードを "<a href="#in-foreign"
|
| 294 |
|
|
title="insertion mode: in foreign content">in foreign content</a>"
|
| 295 |
|
|
に切り替え、<a href="#secondary1">二次挿入モード</a>を "<a
|
| 296 |
|
|
href="#in-body" title="insertion mode: in body">in body</a>"
|
| 297 |
|
|
とし、これらの段階を停止します。
|
| 298 |
|
|
|
| 299 |
|
|
#en
|
| 300 |
|
|
If <var title="">node</var> is a <code><a href="#head">head</a></code>
|
| 301 |
|
|
element, then switch the <span>insertion mode</span> to "<a
|
| 302 |
|
|
href="#in-body" title="insertion mode: in body">in body</a>" ("<a
|
| 303 |
|
|
href="#in-body" title="insertion mode: in body">in body</a>"! <em> not
|
| 304 |
|
|
"<a href="#in-head" title="insertion mode: in head">in head</a>"</em>!)
|
| 305 |
|
|
and abort these steps. (<a href="#fragment">fragment case</a>)
|
| 306 |
|
|
#ja
|
| 307 |
|
|
<var title="">node</var> が <code><a href="#head">head</a></code>
|
| 308 |
|
|
要素の場合、挿入モードを "<a
|
| 309 |
|
|
href="#in-body" title="insertion mode: in body">in body</a>" ("<a
|
| 310 |
|
|
href="#in-body" title="insertion mode: in body">in body</a>"! <em>"<a href="#in-head" title="insertion mode: in head">in head</a>"
|
| 311 |
|
|
ではなく</em>!) に切り替え、これらの段階を停止します。
|
| 312 |
|
|
(<a href="#fragment">素片の場合</a>)
|
| 313 |
|
|
|
| 314 |
|
|
#en
|
| 315 |
|
|
If <var title="">node</var> is an <code><a
|
| 316 |
|
|
href="#html">html</a></code> element, then: if the <a
|
| 317 |
|
|
href="#head-element"><code title="">head</code> element pointer</a> is
|
| 318 |
|
|
null, switch the <span>insertion mode</span> to "<a href="#before5"
|
| 319 |
|
|
title="insertion mode: before head">before head</a>", otherwise, switch
|
| 320 |
|
|
the <span>insertion mode</span> to "<a href="#after4" title="insertion
|
| 321 |
|
|
mode: after head">after head</a>". In either case, abort these steps. (<a
|
| 322 |
|
|
href="#fragment">fragment case</a>)
|
| 323 |
|
|
#ja
|
| 324 |
|
|
<var title="">node</var> が <code><a
|
| 325 |
|
|
href="#html">html</a></code> 要素の場合: <a
|
| 326 |
|
|
href="#head-element"><code title="">head</code> 要素指示子</a>が null
|
| 327 |
|
|
である場合には、挿入モードを "<a href="#before5"
|
| 328 |
|
|
title="insertion mode: before head">before head</a>"
|
| 329 |
|
|
に切り替えます。そうでない場合には、挿入モードを "<a href="#after4" title="insertion
|
| 330 |
|
|
mode: after head">after head</a>" に切り替えます。いずれの場合にも、
|
| 331 |
|
|
これらの段階を停止します。 (<a href="#fragment">素片の場合</a>)
|
| 332 |
|
|
|
| 333 |
|
|
#en
|
| 334 |
|
|
If <var title="">last</var> is true, then switch the <span>insertion
|
| 335 |
|
|
mode</span> to "<a href="#in-body" title="insertion mode: in body">in
|
| 336 |
|
|
body</a>" and abort these steps. (<a href="#fragment">fragment case</a>)
|
| 337 |
|
|
#ja
|
| 338 |
|
|
<var title="">last</var> が真であれば、挿入モードを
|
| 339 |
|
|
"<a href="#in-body" title="insertion mode: in body">in
|
| 340 |
|
|
body</a>" に切り替え、これらの段階を停止します。
|
| 341 |
|
|
(<a href="#fragment">素片の場合</a>)
|
| 342 |
|
|
|
| 343 |
|
|
#en
|
| 344 |
|
|
Let <var title="">node</var> now be the node before <var
|
| 345 |
|
|
title="">node</var> in the <a href="#stack">stack of open elements</a>.
|
| 346 |
apache |
1.6 |
#ja
|
| 347 |
apache |
1.5 |
新たな <var title="">node</var> を<a href="#stack">開いている要素のスタック</a>で <var
|
| 348 |
|
|
title="">node</var> の前にある節点とします。
|
| 349 |
|
|
|
| 350 |
|
|
|
| 351 |
|
|
|
| 352 |
|
|
|
| 353 |
|
|
|
| 354 |
apache |
1.4 |
|
| 355 |
|
|
#pattern
|
| 356 |
|
|
A sequence of bytes starting with: *
|
| 357 |
|
|
#ja
|
| 358 |
|
|
$1 で始まるバイト列
|
| 359 |
|
|
|
| 360 |
|
|
#en
|
| 361 |
|
|
Any other byte
|
| 362 |
|
|
#ja
|
| 363 |
|
|
その他のバイト
|
| 364 |
|
|
|
| 365 |
|
|
#en
|
| 366 |
|
|
Consume the <a href="#next-input">next input character</a>:
|
| 367 |
|
|
#ja
|
| 368 |
|
|
<a href="#next-input">次入力文字</a>を消費:
|
| 369 |
|
|
|
| 370 |
|
|
#en
|
| 371 |
|
|
A comment token
|
| 372 |
|
|
#ja
|
| 373 |
|
|
注釈字句
|
| 374 |
|
|
|
| 375 |
|
|
#en
|
| 376 |
|
|
A DOCTYPE token
|
| 377 |
|
|
#ja
|
| 378 |
|
|
DOCTYPE 字句
|
| 379 |
|
|
|
| 380 |
|
|
#pattern
|
| 381 |
|
|
A start tag whose tag name is "*"
|
| 382 |
|
|
#ja
|
| 383 |
|
|
タグ名が "$1" の開始タグ
|
| 384 |
|
|
|
| 385 |
|
|
#pattern
|
| 386 |
|
|
A start tag whose tag name is one of: *
|
| 387 |
|
|
#ja
|
| 388 |
|
|
タグ名が $1 のいずれかの開始タグ
|
| 389 |
|
|
|
| 390 |
|
|
#pattern
|
| 391 |
|
|
An end tag whose tag name is "*"
|
| 392 |
|
|
#ja
|
| 393 |
|
|
タグ名が "$1" の終了タグ
|
| 394 |
|
|
|
| 395 |
|
|
#pattern
|
| 396 |
|
|
An end tag whose tag name is one of: *
|
| 397 |
|
|
#ja
|
| 398 |
|
|
タグ名が $1 のいずれかの終了タグ
|
| 399 |
|
|
|
| 400 |
|
|
#en
|
| 401 |
|
|
Any other start tag
|
| 402 |
|
|
#ja
|
| 403 |
|
|
その他の開始タグ
|
| 404 |
|
|
|
| 405 |
|
|
#en
|
| 406 |
|
|
Any other end tag
|
| 407 |
|
|
#ja
|
| 408 |
|
|
その他の終了タグ
|
| 409 |
|
|
|
| 410 |
|
|
#en
|
| 411 |
|
|
Anything else
|
| 412 |
|
|
#ja
|
| 413 |
|
|
その他のもの
|
| 414 |
|
|
|
| 415 |
|
|
#en
|
| 416 |
|
|
Run the following algorithm:
|
| 417 |
|
|
#ja
|
| 418 |
|
|
次の算法を実行します:
|
| 419 |
|
|
|
| 420 |
|
|
#en
|
| 421 |
|
|
Otherwise:
|
| 422 |
|
|
#ja
|
| 423 |
|
|
それ以外の場合:
|
| 424 |
|
|
|
| 425 |
|
|
#pattern
|
| 426 |
|
|
Return to step *.
|
| 427 |
|
|
#ja
|
| 428 |
|
|
手順 $1 に戻ります。
|
| 429 |
|
|
|
| 430 |
|
|
#pattern
|
| 431 |
|
|
Act as if a start tag token with the tag name "*" had been seen,
|
| 432 |
|
|
then reprocess the current token.
|
| 433 |
|
|
#ja
|
| 434 |
|
|
タグ名が "$1" の開始タグ字句を見たかのように動作してから、
|
| 435 |
|
|
現在字句を再処理します。
|
| 436 |
|
|
|
| 437 |
|
|
#en
|
| 438 |
|
|
<a href="#parse1">Parse error</a>.
|
| 439 |
|
|
#ja
|
| 440 |
|
|
<a href="#parse1">構文解析誤り</a>。
|
| 441 |
|
|
|
| 442 |
|
|
#en
|
| 443 |
|
|
<a href="#parse1">Parse error</a>. Ignore the token.
|
| 444 |
|
|
#ja
|
| 445 |
|
|
<a href="#parse1">構文解析誤り</a>。字句を無視します。
|