Parent Directory
|
Revision Log
*** empty log message ***
| 1 | wakaba | 1.2 | #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 | |||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | wakaba | 1.1 | #regexp |
| 74 | A sequence of bytes starting with: * | ||
| 75 | #ja | ||
| 76 | $1 で始まるバイト列 | ||
| 77 | |||
| 78 | #en | ||
| 79 | Any other byte | ||
| 80 | #ja | ||
| 81 | その他のバイト | ||
| 82 | |||
| 83 | #en | ||
| 84 | Consume the <a href="#next-input">next input character</a>: | ||
| 85 | #ja | ||
| 86 | <a href="#next-input">次入力文字</a>を消費: | ||
| 87 | |||
| 88 | #en | ||
| 89 | A comment token | ||
| 90 | #ja | ||
| 91 | 注釈字句 | ||
| 92 | |||
| 93 | #en | ||
| 94 | A DOCTYPE token | ||
| 95 | #ja | ||
| 96 | DOCTYPE 字句 | ||
| 97 | |||
| 98 | #regexp | ||
| 99 | A start tag whose tag name is "*" | ||
| 100 | #ja | ||
| 101 | タグ名が "$1" の開始タグ | ||
| 102 | |||
| 103 | #regexp | ||
| 104 | A start tag whose tag name is one of: * | ||
| 105 | #ja | ||
| 106 | タグ名が $1 のいずれかの開始タグ | ||
| 107 | |||
| 108 | #regexp | ||
| 109 | An end tag whose tag name is "*" | ||
| 110 | #ja | ||
| 111 | タグ名が "$1" の終了タグ | ||
| 112 | |||
| 113 | #regexp | ||
| 114 | An end tag whose tag name is one of: * | ||
| 115 | #ja | ||
| 116 | タグ名が $1 のいずれかの終了タグ | ||
| 117 | |||
| 118 | #en | ||
| 119 | Any other start tag | ||
| 120 | #ja | ||
| 121 | その他の開始タグ | ||
| 122 |