/[suikacvs]/markup/html/html5/spec-ja/data/microsyntaxes.dat
Suika

Diff of /markup/html/html5/spec-ja/data/microsyntaxes.dat

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Sat Jun 28 06:13:21 2008 UTC revision 1.2 by apache, Fri Jul 11 10:40:31 2008 UTC
# Line 1  Line 1 
1  #regexp  #pattern
2  <span class=secno>* </span>Common microsyntaxes  <span class=secno>* </span>Common microsyntaxes
3  #ja  #ja
4  <span class=secno>$1 </span>共通マイクロ構文  <span class=secno>$1 </span>共通マイクロ構文
5    
6  #en  #en
7    There are various places in HTML that accept particular data types, such    There are various places in HTML that accept particular data types, such
8     as dates or numbers. This section describes what the conformance criteria     as dates or numbers. This section describes what the conformance criteria
9     for content in those formats is, and how to parse them.     for content in those formats is, and how to parse them.
10  #ja  #ja
11  HTML 中のいろいろな場所で、日付や数値のような特定のデータ型を使うことができます。  HTML 中のいろいろな場所で、日付や数値のような特定のデータ型を使うことができます。
12  この節では、そのような書式の内容の適合基準は何か、  この節では、そのような書式の内容の適合基準は何か、
13  どう構文解析するかを説明します。  どう構文解析するかを説明します。
14    
15  #en  #en
16    Need to go through the whole spec and make sure all the    Need to go through the whole spec and make sure all the
17     attribute values are clearly defined either in terms of microsyntaxes or     attribute values are clearly defined either in terms of microsyntaxes or
18     in terms of other specs, or as "Text" or some such.     in terms of other specs, or as "Text" or some such.
19  #ja  #ja
20  仕様書全体について、すべての属性値がマイクロ構文を使ってか他の仕様書を使ってか「文章」などとして定義されるようにする必要があります。  仕様書全体について、すべての属性値がマイクロ構文を使ってか他の仕様書を使ってか「文章」などとして定義されるようにする必要があります。
21    
22  #regexp  #pattern
23  <span class=secno>* </span>Common parser idioms  <span class=secno>* </span>Common parser idioms
24  #ja  #ja
25  <span class=secno>$1 </span>構文解析器共通慣用句  <span class=secno>$1 </span>構文解析器共通慣用句
26    
27  #en  #en
28    The <dfn id=space title="space character">space characters</dfn>, for    The <dfn id=space title="space character">space characters</dfn>, for
29     the purposes of this specification, are U+0020 SPACE, U+0009 CHARACTER     the purposes of this specification, are U+0020 SPACE, U+0009 CHARACTER
30     TABULATION (tab), U+000A LINE FEED (LF), U+000C FORM FEED (FF), and U+000D     TABULATION (tab), U+000A LINE FEED (LF), U+000C FORM FEED (FF), and U+000D
31     CARRIAGE RETURN (CR).     CARRIAGE RETURN (CR).
32  #ja  #ja
33  <dfn id=space title="space character">間隔文字</dfn>は、  <dfn id=space title="space character">間隔文字</dfn>は、
34  この仕様書においては、 U+0020 SPACE, U+0009 CHARACTER  この仕様書においては、 U+0020 SPACE, U+0009 CHARACTER
35     TABULATION (tab)、U+000A LINE FEED (LF)、U+000C FORM FEED (FF)、 U+000D     TABULATION (tab)、U+000A LINE FEED (LF)、U+000C FORM FEED (FF)、 U+000D
36     CARRIAGE RETURN (CR) です。     CARRIAGE RETURN (CR) です。
37    
38  #en  #en
39    Some of the micro-parsers described below follow the pattern of having    Some of the micro-parsers described below follow the pattern of having
40     an <var title="">input</var> variable that holds the string being parsed,     an <var title="">input</var> variable that holds the string being parsed,
41     and having a <var title="">position</var> variable pointing at the next     and having a <var title="">position</var> variable pointing at the next
42     character to parse in <var title="">input</var>.     character to parse in <var title="">input</var>.
43  #ja  #ja
44  これ以降で説明するマイクロ構文解析器のいくつかは、構文解析される文字列を保持する  これ以降で説明するマイクロ構文解析器のいくつかは、構文解析される文字列を保持する
45  <var title="">input</var> 変数を持ち、 <var title="">input</var>  <var title="">input</var> 変数を持ち、 <var title="">input</var>
46  中で次に構文解析する文字を指す <var title="">position</var>  中で次に構文解析する文字を指す <var title="">position</var>
47  変数を持つというパターンに従っています。  変数を持つというパターンに従っています。
48    
49  #en  #en
50    For parsers based on this pattern, a step that requires the user agent    For parsers based on this pattern, a step that requires the user agent
51     to <dfn id=collect>collect a sequence of characters</dfn> means that the     to <dfn id=collect>collect a sequence of characters</dfn> means that the
52     following algorithm must be run, with <var title="">characters</var> being     following algorithm must be run, with <var title="">characters</var> being
53     the set of characters that can be collected:     the set of characters that can be collected:
54  #ja  #ja
55  このパターンに従う構文解析器において、利用者エージェントが<dfn id=collect>文字列を集める</dfn>ことを要求している段階は、  このパターンに従う構文解析器において、利用者エージェントが<dfn id=collect>文字列を集める</dfn>ことを要求している段階は、
56  次の算法を、 <var title="">characters</var>  次の算法を、 <var title="">characters</var>
57  が収集できる文字の集合であるとして実行しなければ[[MUST:ならない]]ことを意味しています。  が収集できる文字の集合であるとして実行しなければ[[MUST:ならない]]ことを意味しています。
58    
59  #en  #en
60      Let <var title="">input</var> and <var title="">position</var> be the      Let <var title="">input</var> and <var title="">position</var> be the
61       same variables as those of the same name in the algorithm that invoked       same variables as those of the same name in the algorithm that invoked
62       these steps.       these steps.
63  #ja  #ja
64  <var title="">input</var> と <var title="">position</var>  <var title="">input</var> と <var title="">position</var>
65  を、これらの段階を呼び出した算法中の同名の変数と同じものとします。  を、これらの段階を呼び出した算法中の同名の変数と同じものとします。
66    
67  #en  #en
68  Let <var title="">result</var> be the empty string.  Let <var title="">result</var> be the empty string.
69  #ja  #ja
70  <var title="">result</var> を空文字列とします。  <var title="">result</var> を空文字列とします。
71    
72  #en  #en
73      While <var title="">position</var> doesn't point past the end of <var      While <var title="">position</var> doesn't point past the end of <var
74       title="">input</var> and the character at <var title="">position</var>       title="">input</var> and the character at <var title="">position</var>
75       is one of the <var title="">characters</var>, append that character to       is one of the <var title="">characters</var>, append that character to
76       the end of <var title="">result</var> and advance <var       the end of <var title="">result</var> and advance <var
77       title="">position</var> to the next character in <var       title="">position</var> to the next character in <var
78       title="">input</var>.       title="">input</var>.
79  #ja  #ja
80  <var title="">position</var> が <var  <var title="">position</var> が <var
81       title="">input</var> の終わりの更に先を指しておらず、 <var title="">position</var>       title="">input</var> の終わりの更に先を指しておらず、 <var title="">position</var>
82  の文字が <var title="">characters</var> のうちの1つである間、  の文字が <var title="">characters</var> のうちの1つである間、
83  その文字を <var title="">result</var> の終わりに追加し、 <var  その文字を <var title="">result</var> の終わりに追加し、 <var
84       title="">position</var> を <var       title="">position</var> を <var
85       title="">input</var> の次の文字に進めます。       title="">input</var> の次の文字に進めます。
86    
87  #en  #en
88      Return <var title="">result</var>.      Return <var title="">result</var>.
89  #ja  #ja
90  <var title="">result</var> を返します。  <var title="">result</var> を返します。
91    
92  #en  #en
93    The step <dfn id=skip-whitespace>skip whitespace</dfn> means that the    The step <dfn id=skip-whitespace>skip whitespace</dfn> means that the
94     user agent must <a href="#collect">collect a sequence of characters</a>     user agent must <a href="#collect">collect a sequence of characters</a>
95     that are <a href="#space" title="space character">space characters</a>.     that are <a href="#space" title="space character">space characters</a>.
96     The step <dfn id=skip->skip Zs characters</dfn> means that the user agent     The step <dfn id=skip->skip Zs characters</dfn> means that the user agent
97     must <a href="#collect">collect a sequence of characters</a> that are in     must <a href="#collect">collect a sequence of characters</a> that are in
98     the Unicode character class Zs. In both cases, the collected characters     the Unicode character class Zs. In both cases, the collected characters
99     are not used. <a href="#refsUNICODE">[UNICODE]</a>     are not used. <a href="#refsUNICODE">[UNICODE]</a>
100  #ja  #ja
101  <dfn id=skip-whitespace>空白を飛ばす</dfn>段階は、  <dfn id=skip-whitespace>空白を飛ばす</dfn>段階は、
102  利用者エージェントが<a href="#space" title="space character">間隔文字</a>である<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。  利用者エージェントが<a href="#space" title="space character">間隔文字</a>である<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。
103  <dfn id=skip->Zs 文字を飛ばす</dfn>段階は、  <dfn id=skip->Zs 文字を飛ばす</dfn>段階は、
104  利用者エージェントが Unicode 文字クラス Zs に含まれる<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。  利用者エージェントが Unicode 文字クラス Zs に含まれる<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。
105  どちらの場合も、集めた文字は使いません。 <a href="#refsUNICODE">[UNICODE]</a>  どちらの場合も、集めた文字は使いません。 <a href="#refsUNICODE">[UNICODE]</a>
106    
107  #regexp  #pattern
108  <span class=secno>* </span>Boolean attributes  <span class=secno>* </span>Boolean attributes
109  #ja  #ja
110  <span class=secno>$1 </span>ブール型属性  <span class=secno>$1 </span>ブール型属性
111    
112  #en  #en
113    A number of attributes in HTML5 are <dfn id=boolean0 title="boolean    A number of attributes in HTML5 are <dfn id=boolean0 title="boolean
114     attribute">boolean attributes</dfn>. The presence of a boolean attribute     attribute">boolean attributes</dfn>. The presence of a boolean attribute
115     on an element represents the true value, and the absence of the attribute     on an element represents the true value, and the absence of the attribute
116     represents the false value.     represents the false value.
117  #ja  #ja
118  HTML5 の数々の属性は<dfn id=boolean0 title="boolean  HTML5 の数々の属性は<dfn id=boolean0 title="boolean
119     attribute">ブール型属性</dfn>です。要素にブール型属性が存在すると真の値を表し、     attribute">ブール型属性</dfn>です。要素にブール型属性が存在すると真の値を表し、
120  存在しないと偽の値を表します。  存在しないと偽の値を表します。
121    
122  #en  #en
123    If the attribute is present, its value must either be the empty string    If the attribute is present, its value must either be the empty string
124     or a value that is a case-insensitive <!-- XXX ASCII --> match for the     or a value that is a case-insensitive <!-- XXX ASCII --> match for the
125     attribute's canonical name, with no leading or trailing whitespace.     attribute's canonical name, with no leading or trailing whitespace.
126  #ja  #ja
127  属性が存在する場合、値は、  属性が存在する場合、値は、
128  空文字列か大文字・小文字を区別しないと属性の正準名と一致する  空文字列か大文字・小文字を区別しないと属性の正準名と一致する
129  (先頭にも末尾にも空白がない) 値のいずれかでなければ[[MUST:なりません]]。  (先頭にも末尾にも空白がない) 値のいずれかでなければ[[MUST:なりません]]。
130    
131  #regexp  #pattern
132  <span class=secno>* </span>Numbers  <span class=secno>* </span>Numbers
133  #ja  #ja
134  <span class=secno>$1 </span>数値  <span class=secno>$1 </span>数値
135    
136  #regexp  #pattern
137  <span class=secno>* </span>Unsigned integers  <span class=secno>* </span>Unsigned integers
138  #ja  #ja
139  <span class=secno>$1 </span>符号無し整数  <span class=secno>$1 </span>符号無し整数
140    
141  #en  #en
142  A string is a <dfn id=valid0>valid non-negative integer</dfn> if it  A string is a <dfn id=valid0>valid non-negative integer</dfn> if it
143     consists of one of more characters in the range U+0030 DIGIT ZERO (0) to     consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
144     U+0039 DIGIT NINE (9).     U+0039 DIGIT NINE (9).
145  #ja  #ja
146  文字列は、範囲 U+0030 DIGIT ZERO (0) から U+0039 DIGIT NINE (9)  文字列は、範囲 U+0030 DIGIT ZERO (0) から U+0039 DIGIT NINE (9)
147  までの文字1文字以上で構成される場合、<dfn id=valid0>妥当な非負整数</dfn>です。  までの文字1文字以上で構成される場合、<dfn id=valid0>妥当な非負整数</dfn>です。
148    
149  #en  #en
150  The <dfn id=rules>rules for parsing non-negative integers</dfn> are as  The <dfn id=rules>rules for parsing non-negative integers</dfn> are as
151     given in the following algorithm. When invoked, the steps must be followed     given in the following algorithm. When invoked, the steps must be followed
152     in the order given, aborting at the first step that returns a value. This     in the order given, aborting at the first step that returns a value. This
153     algorithm will either return zero, a positive integer, or an error.     algorithm will either return zero, a positive integer, or an error.
154     Leading spaces are ignored. Trailing spaces and indeed any trailing     Leading spaces are ignored. Trailing spaces and indeed any trailing
155     garbage characters are ignored.     garbage characters are ignored.
156  #ja  #ja
157  <dfn id=rules>非負整数を構文解析する規則</dfn>は次の算法で与えられるものです。  <dfn id=rules>非負整数を構文解析する規則</dfn>は次の算法で与えられるものです。
158  この算法が呼び出された時には、与えられた順に段階に従い、  この算法が呼び出された時には、与えられた順に段階に従い、
159  値を返す最初の段階で中断しなければ[[MUST:なりません]]。  値を返す最初の段階で中断しなければ[[MUST:なりません]]。
160  この算法は零か正整数か誤りを返します。  この算法は零か正整数か誤りを返します。
161  先頭の間隔は無視されます。末尾の空白、というかごみ文字列はすべて無視されます。  先頭の間隔は無視されます。末尾の空白、というかごみ文字列はすべて無視されます。
162    
163  #en  #en
164      Let <var title="">input</var> be the string being parsed.      Let <var title="">input</var> be the string being parsed.
165  #ja  #ja
166  <var title="">input</var> を構文解析される文字列とします。  <var title="">input</var> を構文解析される文字列とします。
167    
168  #en  #en
169      Let <var title="">position</var> be a pointer into <var      Let <var title="">position</var> be a pointer into <var
170       title="">input</var>, initially pointing at the start of the string.       title="">input</var>, initially pointing at the start of the string.
171  #ja  #ja
172  <var title="">position</var> を <var  <var title="">position</var> を <var
173       title="">input</var> 中の指示子とし、初期位置を文字列の始めとします。       title="">input</var> 中の指示子とし、初期位置を文字列の始めとします。
174    
175  #en  #en
176     Let <var title="">value</var> have the value 0.     Let <var title="">value</var> have the value 0.
177  #ja  #ja
178  <var title="">value</var> を値 0 にします。  <var title="">value</var> を値 0 にします。
179    
180  #en  #en
181      <a href="#skip-whitespace">Skip whitespace.</a>      <a href="#skip-whitespace">Skip whitespace.</a>
182  #ja  #ja
183      <a href="#skip-whitespace">空白を読み飛ばします。</a>      <a href="#skip-whitespace">空白を読み飛ばします。</a>
184    
185  #en  #en
186      If <var title="">position</var> is past the end of <var      If <var title="">position</var> is past the end of <var
187       title="">input</var>, return an error.       title="">input</var>, return an error.
188  #ja  #ja
189  <var title="">position</var> が <var  <var title="">position</var> が <var
190       title="">input</var> の終わりを過ぎていれば、誤りを返します。       title="">input</var> の終わりを過ぎていれば、誤りを返します。
191    
192  #en  #en
193      If the next character is not one of U+0030 DIGIT ZERO (0) .. U+0039      If the next character is not one of U+0030 DIGIT ZERO (0) .. U+0039
194       DIGIT NINE (9), then return an error.       DIGIT NINE (9), then return an error.
195  #ja  #ja
196  次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039  次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039
197       DIGIT NINE (9) のうちの1つでない場合、誤りを返します。       DIGIT NINE (9) のうちの1つでない場合、誤りを返します。
198    
199  #en  #en
200      If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT      If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT
201       NINE (9):       NINE (9):
202  #ja  #ja
203  次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039  次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039
204       DIGIT NINE (9) のうちの1つである場合:       DIGIT NINE (9) のうちの1つである場合:
205    
206  #en  #en
207       Multiply <var title="">value</var> by ten.       Multiply <var title="">value</var> by ten.
208  #ja  #ja
209  <var title="">value</var> を10倍します。  <var title="">value</var> を10倍します。
210    
211  #en  #en
212        Add the value of the current character (0..9) to <var        Add the value of the current character (0..9) to <var
213        title="">value</var>.        title="">value</var>.
214  #ja  #ja
215  現在の文字の値 (0〜9) を <var  現在の文字の値 (0〜9) を <var
216        title="">value</var> に加えます。        title="">value</var> に加えます。
217    
218  #en  #en
219       Advance <var title="">position</var> to the next character.       Advance <var title="">position</var> to the next character.
220  #ja  #ja
221  <var title="">position</var> を次の文字に進めます。  <var title="">position</var> を次の文字に進めます。
222    
223  #regexp  #pattern
224       If <var title="">position</var> is not past the end of <var       If <var title="">position</var> is not past the end of <var
225        title="">input</var>, return to the top of step * in the overall        title="">input</var>, return to the top of step * in the overall
226        algorithm (that's the step within which these substeps find        algorithm (that's the step within which these substeps find
227        themselves).        themselves).
228  #ja  #ja
229  <var title="">position</var> が <var  <var title="">position</var> が <var
230        title="">input</var> の終わりを過ぎていなければ、        title="">input</var> の終わりを過ぎていなければ、
231  算法全体の段階 $1 (これらの部分段階自体が含まれている段階) の先頭に返ります。  算法全体の段階 $1 (これらの部分段階自体が含まれている段階) の先頭に返ります。
232    
233  #en  #en
234      Return <var title="">value</var>.      Return <var title="">value</var>.
235  #ja  #ja
236  <var title="">value</var> を返します。  <var title="">value</var> を返します。

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24