/[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.15 by apache, Tue Aug 19 14:53:10 2008 UTC
# Line 1  Line 1 
1  #regexp  #pattern
2  <span class=secno>* </span>Common microsyntaxes  <span class=secno>* </span>Common microsyntaxes
3    #ja
4    <span class=secno>$1 </span>共通マイクロ構文
5    
6    #en
7      There are various places in HTML that accept particular data types, such
8       as dates or numbers. This section describes what the conformance criteria
9       for content in those formats is, and how to parse them.
10    #ja
11    HTML 中のいろいろな場所で、日付や数値のような特定のデータ型を使うことができます。
12    この節では、そのような書式の内容の適合基準は何か、
13    どう構文解析するかを説明します。
14    
15    #en
16      Need to go through the whole spec and make sure all the
17       attribute values are clearly defined either in terms of microsyntaxes or
18       in terms of other specs, or as "Text" or some such.
19    #ja
20    仕様書全体について、すべての属性値がマイクロ構文を使ってか他の仕様書を使ってか「文章」などとして定義されるようにする必要があります。
21    
22    #pattern
23    <span class=secno>* </span>Common parser idioms
24    #ja
25    <span class=secno>$1 </span>構文解析器共通慣用句
26    
27    #en
28      The <dfn id=space title="space character">space characters</dfn>, for
29       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
31       CARRIAGE RETURN (CR).
32    #ja
33    <dfn id=space title="space character">間隔文字</dfn>は、
34    この仕様書においては、 U+0020 SPACE, U+0009 CHARACTER
35       TABULATION (tab)、U+000A LINE FEED (LF)、U+000C FORM FEED (FF)、 U+000D
36       CARRIAGE RETURN (CR) です。
37    
38    #en
39      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,
41       and having a <var title="">position</var> variable pointing at the next
42       character to parse in <var title="">input</var>.
43    #ja
44    これ以降で説明するマイクロ構文解析器のいくつかは、構文解析される文字列を保持する
45    <var title="">input</var> 変数を持ち、 <var title="">input</var>
46    中で次に構文解析する文字を指す <var title="">position</var>
47    変数を持つというパターンに従っています。
48    
49    #en
50      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
52       following algorithm must be run, with <var title="">characters</var> being
53       the set of characters that can be collected:
54    #ja
55    このパターンに従う構文解析器において、利用者エージェントが<dfn id=collect>文字列を集める</dfn>ことを要求している段階は、
56    次の算法を、 <var title="">characters</var>
57    が収集できる文字の集合であるとして実行しなければ[[MUST:ならない]]ことを意味しています。
58    
59    #en
60        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
62         these steps.
63    #ja
64    <var title="">input</var> と <var title="">position</var>
65    を、これらの段階を呼び出した算法中の同名の変数と同じものとします。
66    
67    #en
68    Let <var title="">result</var> be the empty string.
69    #ja
70    <var title="">result</var> を空文字列とします。
71    
72    #en
73        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>
75         is one of the <var title="">characters</var>, append that character to
76         the end of <var title="">result</var> and advance <var
77         title="">position</var> to the next character in <var
78         title="">input</var>.
79    #ja
80    <var title="">position</var> が <var
81         title="">input</var> の終わりの更に先を指しておらず、 <var title="">position</var>
82    の文字が <var title="">characters</var> のうちの1つである間、
83    その文字を <var title="">result</var> の終わりに追加し、 <var
84         title="">position</var> を <var
85         title="">input</var> の次の文字に進めます。
86    
87    #en
88        Return <var title="">result</var>.
89    #ja
90    <var title="">result</var> を返します。
91    
92    #en
93      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>
95       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
97       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
99       are not used. <a href="#refsUNICODE">[UNICODE]</a>
100    #ja
101    <dfn id=skip-whitespace>空白を飛ばす</dfn>段階は、
102    利用者エージェントが<a href="#space" title="space character">間隔文字</a>である<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。
103    <dfn id=skip->Zs 文字を飛ばす</dfn>段階は、
104    利用者エージェントが Unicode 文字クラス Zs に含まれる<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。
105    どちらの場合も、集めた文字は使いません。 <a href="#refsUNICODE">[UNICODE]</a>
106    
107    #pattern
108    <span class=secno>* </span>Boolean attributes
109    #ja
110    <span class=secno>$1 </span>ブール型属性
111    
112    #en
113      A number of attributes in HTML5 are <dfn id=boolean0 title="boolean
114       attribute">boolean attributes</dfn>. The presence of a boolean attribute
115       on an element represents the true value, and the absence of the attribute
116       represents the false value.
117    #ja
118    HTML5 の数々の属性は<dfn id=boolean0 title="boolean
119       attribute">ブール型属性</dfn>です。要素にブール型属性が存在すると真の値を表し、
120    存在しないと偽の値を表します。
121    
122    #en
123    If the attribute is present, its value must either be the empty string
124       or a value that is an <a href="#ascii">ASCII case-insensitive</a> match
125       for the attribute's canonical name, with no leading or trailing
126       whitespace.
127    #ja
128    属性が存在する場合、その値は空文字列か、または
129    <a href="#ascii">ASCII 大文字・小文字不区別</a>で属性の正準名と一致するような
130    (先頭にも末尾にも空白がない) 値のいずれかでなければ[[MUST:なりません]]。
131    
132    #pattern
133    <span class=secno>* </span>Numbers
134    #ja
135    <span class=secno>$1 </span>数値
136    
137    #pattern
138    <span class=secno>* </span>Unsigned integers
139    #ja
140    <span class=secno>$1 </span>符号無し整数
141    
142    #en
143    A string is a <dfn id=valid>valid non-negative integer</dfn> if it
144       consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
145       U+0039 DIGIT NINE (9).
146    #ja
147    文字列は、範囲 U+0030 DIGIT ZERO (0) ~ U+0039 DIGIT NINE (9)
148    の文字1文字以上で構成される場合、<dfn id=valid>妥当な非負整数</dfn>です。
149    
150    #en
151    The <dfn id=rules>rules for parsing non-negative integers</dfn> are as
152       given in the following algorithm. When invoked, the steps must be followed
153       in the order given, aborting at the first step that returns a value. This
154       algorithm will either return zero, a positive integer, or an error.
155       Leading spaces are ignored. Trailing spaces and indeed any trailing
156       garbage characters are ignored.
157    #ja
158    <dfn id=rules>非負整数を構文解析する規則</dfn>は次の算法で与えられるものです。
159    この算法が呼び出された時には、与えられた順に段階に従い、
160    値を返す最初の段階で中断しなければ[[MUST:なりません]]。
161    この算法は零か正整数か誤りを返します。
162    先頭の間隔は無視されます。末尾の空白、というかごみ文字列はすべて無視されます。
163    
164    #en
165        Let <var title="">input</var> be the string being parsed.
166    #ja
167    <var title="">input</var> を構文解析される文字列とします。
168    
169    #en
170        Let <var title="">position</var> be a pointer into <var
171         title="">input</var>, initially pointing at the start of the string.
172    #ja
173    <var title="">position</var> を <var
174         title="">input</var> 中の指示子とし、初期位置を文字列の始めとします。
175    
176    #en
177       Let <var title="">value</var> have the value 0.
178    #ja
179    <var title="">value</var> を値 0 にします。
180    
181    #en
182        <a href="#skip-whitespace">Skip whitespace</a>.
183    #ja
184        <a href="#skip-whitespace">空白を読み飛ばします</a>。
185    
186    #en
187        If <var title="">position</var> is past the end of <var
188         title="">input</var>, return an error.
189    #ja
190    <var title="">position</var> が <var
191         title="">input</var> の終わりを過ぎていれば、誤りを返します。
192    
193    #en
194        If the next character is not one of U+0030 DIGIT ZERO (0) .. U+0039
195         DIGIT NINE (9), then return an error.
196    #ja
197    次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039
198         DIGIT NINE (9) のうちの1つでない場合、誤りを返します。
199    
200    #en
201        If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT
202         NINE (9):
203    #ja
204    次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039
205         DIGIT NINE (9) のうちの1つである場合:
206    
207    #en
208         Multiply <var title="">value</var> by ten.
209    #ja
210    <var title="">value</var> を10倍します。
211    
212    #en
213          Add the value of the current character (0..9) to <var
214          title="">value</var>.
215    #ja
216    現在の文字の値 (0〜9) を <var
217          title="">value</var> に加えます。
218    
219    #en
220         Advance <var title="">position</var> to the next character.
221    #ja
222    <var title="">position</var> を次の文字に進めます。
223    
224    #pattern
225         If <var title="">position</var> is not past the end of <var
226          title="">input</var>, return to the top of step * in the overall
227          algorithm (that's the step within which these substeps find
228          themselves).
229    #ja
230    <var title="">position</var> が <var
231          title="">input</var> の終わりを過ぎていなければ、
232    算法全体の段階 $1 (これらの部分段階自体が含まれている段階) の先頭に返ります。
233    
234    #en
235        Return <var title="">value</var>.
236    #ja
237    <var title="">value</var> を返します。
238    
239    #pattern
240    <span class=secno>* </span>Signed integers
241    #ja
242    <span class=secno>$1 </span>符号付き整数
243    
244    #en
245    A string is a <dfn id=valid0>valid integer</dfn> if it consists of one
246       of more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
247       (9), optionally prefixed with a U+002D HYPHEN-MINUS ("-") character.
248    #ja
249    文字列は、範囲 U+0030 DIGIT ZERO (0) ~ U+0039 DIGIT NINE
250       (9) の文字1文字以上で構成され、任意選択で接頭辞として U+002D HYPHEN-MINUS ("-")
251    文字がある場合、<dfn id=valid0>妥当な整数</dfn>です。
252    
253    #en
254    The <dfn id=rules0>rules for parsing integers</dfn> are similar to the
255       rules for non-negative integers, and are as given in the following
256       algorithm. When invoked, the steps must be followed in the order given,
257       aborting at the first step that returns a value. This algorithm will
258       either return an integer or an error. Leading spaces are ignored. Trailing
259       spaces and trailing garbage characters are ignored.
260    #ja
261    <dfn id=rules0>整数を構文解析する規則</dfn>は、非負整数用の規則と似ており、
262    次の算法により与えられます。これらの段階は、呼び出された場合、
263    与えられた順序に従い実行し、初めて値を返す段階で停止しなければ[[MUST:なりません]]。
264    この算法は整数か誤りのいずれかを返します。先頭の間隔は無視されます。
265    末尾の間隔や末尾のごみ文字は無視されます。
266    
267    #en
268    Let <var title="">sign</var> have the value "positive".
269    #ja
270    <var title="">sign</var> を、「正」という値を持つようにします。
271    
272    #en
273    If the character indicated by <var title="">position</var> (the first
274         character) is a U+002D HYPHEN-MINUS ("-") character:
275    #ja
276    <var title="">position</var> が示す文字 (最初の文字)
277    が U+002D HYPHEN-MINUS ("-") 文字である場合、
278    
279    #en
280    Let <var title="">sign</var> be "negative".
281    #ja
282    <var title="">sign</var> を「負」とします。
283    
284    #en
285    If <var title="">sign</var> is "positive", return <var
286         title="">value</var>, otherwise return 0-<var title="">value</var>.
287    #ja
288    <var title="">sign</var> が「正」の場合、 <var
289         title="">value</var> を返します。そうでない場合、
290    0-<var title="">value</var> を返します。
291    
292    #pattern
293    <span class=secno>* </span>Real numbers
294    #ja
295    <span class=secno>$1 </span>実数
296    
297    #en
298    A string is a <dfn id=valid1>valid floating point number</dfn> if it
299       consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
300       U+0039 DIGIT NINE (9), optionally with a single U+002E FULL STOP (".")
301       character somewhere (either before these numbers, in between two numbers,
302       or after the numbers), all optionally prefixed with a U+002D HYPHEN-MINUS
303       ("-") character.
304    #ja
305    文字列は、範囲 U+0030 DIGIT ZERO (0) ~
306       U+0039 DIGIT NINE (9) の文字1文字以上で構成され、
307    任意選択で U+002E FULL STOP (".") 文字1文字がどこか (数字の前か、
308    2つの数字の間か、数字の後のいずれか) を含み、その全体について任意選択で接頭辞として
309    U+002D HYPHEN-MINUS ("-") 文字がある場合、<dfn id=valid1>妥当な浮動小数点数</dfn>です。
310    
311    #en
312    The <dfn id=rules1>rules for parsing floating point number values</dfn>
313       are as given in the following algorithm. As with the previous algorithms,
314       when this one is invoked, the steps must be followed in the order given,
315       aborting at the first step that returns a value. This algorithm will
316       either return a number or an error. Leading spaces are ignored. Trailing
317       spaces and garbage characters are ignored.
318    #ja
319    <dfn id=rules1>浮動小数点数値を構文解析する規則</dfn>は次の算法により与えられる通りです。
320    前述の算法と同様で、この算法が呼び出された時も、
321    与えられた順序に従い実行し、値を返す最初の段階で停止しなければ[[MUST:なりません]]。
322    この算法は、数か誤りのいずれかを返します。先頭の間隔は無視されます。
323    末尾の間隔とごみ文字は無視されます。
324    
325    #en
326    If the next character is not one of U+0030 DIGIT ZERO (0) .. U+0039
327         DIGIT NINE (9) or U+002E FULL STOP ("."), then return an error.
328    #ja
329    次の文字が U+0030 DIGIT ZERO (0) ~ U+0039
330         DIGIT NINE (9) か U+002E FULL STOP (".") のいずれかでなければ、
331    誤りを返します。
332    
333    #en
334    If the next character is U+002E FULL STOP ("."), but either that is
335         the last character or the character after that one is not one of U+0030
336         DIGIT ZERO (0) .. U+0039 DIGIT NINE (9), then return an error.
337    #ja
338    次の文字が U+002E FULL STOP (".") でありながら、
339    これが最後の文字であるか、またはその次の文字が U+0030
340         DIGIT ZERO (0) ~ U+0039 DIGIT NINE (9) のいずれかではない場合、
341    誤りを返します。
342    
343    #en
344    If <var title="">position</var> is past the end of <var
345          title="">input</var>, then if <var title="">sign</var> is "positive",
346          return <var title="">value</var>, otherwise return 0-<var
347          title="">value</var>.
348    #ja
349    <var title="">position</var> が <var
350          title="">input</var> の終わりを過ぎている場合には、
351    <var title="">sign</var> が「正」であるなら <var title="">value</var>
352    を返し、そうでないなら 0-<var
353          title="">value</var> を返します。
354    
355    #en
356    Otherwise return to the top of step 10 in the overall algorithm
357          (that's the step within which these substeps find themselves).
358    #ja
359    そうでない場合、全体の算法の段階 10 (これら部分段階が含まれている段階)
360    の先頭に戻ります。
361    
362    #en
363    Otherwise, if the next character is not a U+002E FULL STOP ("."), then
364         if <var title="">sign</var> is "positive", return <var
365         title="">value</var>, otherwise return 0-<var title="">value</var>.
366    #ja
367    そうでない場合、次の文字が U+002E FULL STOP (".") でない場合には、
368    <var title="">sign</var> が「正」であるなら <var title="">value</var>
369    を返し、そうでないなら 0-<var
370          title="">value</var> を返します。
371    
372    #en
373    The next character is a U+002E FULL STOP ("."). Advance <var
374         title="">position</var> to the character after that.
375    #ja
376    次の文字は U+002E FULL STOP (".") です。 <var
377         title="">position</var> をその次の文字に進めます。
378    
379    #en
380    Let <var title="">divisor</var> be 1.
381    #ja
382    <var title="">divisor</var> を 1 とします。
383    
384    #en
385    Multiply <var title="">divisor</var> by ten.
386    #ja
387    <var title="">divisor</var> に 10 を掛けます。
388    
389    #en
390    Add the value of the current character (0..9) divided by <var
391          title="">divisor</var>, to <var title="">value</var>.
392    #ja
393    現在の文字の値 (0~9) を <var
394          title="">divisor</var> で割った値を、<var title="">value</var>
395    に加えます。
396    
397    #en
398    Otherwise return to the top of step 14 in the overall algorithm
399          (that's the step within which these substeps find themselves).
400    #ja
401    そうでない場合、全体の算法の段階 14 (これら部分段階が含まれている段階) の先頭に戻ります。
402    
403    #en
404    Otherwise, if <var title="">sign</var> is "positive", return <var
405         title="">value</var>, otherwise return 0-<var title="">value</var>.
406    #ja
407    そうでない場合、
408    <var title="">sign</var> が「正」であるなら <var title="">value</var>
409    を返し、そうでないなら 0-<var
410          title="">value</var> を返します。
411    
412    #pattern
413    <span class=secno>* </span>Ratios
414    #ja
415    <span class=secno>$1 </span>比率
416    
417    #en
418    The algorithms described in this section are used by the
419       <code><a href="#progress">progress</a></code> and <code><a
420       href="#meter">meter</a></code> elements.
421    #ja
422    この節で説明する算法は、 <code><a href="#progress">progress</a></code> 要素と
423    <code><a
424       href="#meter">meter</a></code> 要素で使います。
425    
426    #en
427    A <dfn id=valid2>valid denominator punctuation character</dfn> is one of
428       the characters from the table below. There is <dfn id=a-value
429       title="values associated with denominator punctuation characters">a value
430       associated with each denominator punctuation character</dfn>, as shown in
431       the table below.
432    #ja
433    <dfn id=valid2>妥当な分母句読点文字</dfn>は、
434    次の表の文字のいずれかです。次の表に示すように、<dfn id=a-value
435       title="values associated with denominator punctuation characters">各分母句読点文字には関連付けられた値</dfn>があります。
436    
437    #en
438    Denominator Punctuation Character
439    #ja
440    分母句読点文字
441    
442    #en
443    Value
444    #ja
445    値
446    
447    #en
448    The <dfn id=steps>steps for finding one or two numbers of a ratio in a
449       string</dfn> are as follows:
450    #ja
451    <dfn id=steps>文字列中の比率の1つか2つの数字を探す段階</dfn>は、次の通りです。
452    
453    #en
454    If the string is empty, then return nothing and abort these steps.
455    #ja
456    文字列が空である場合、何も返さず、これらの段階を停止します。
457    
458    #en
459    <a href="#find-a">Find a number</a> in the string according to the
460        algorithm below, starting at the start of the string.
461    #ja
462    後述の算法に従い、文字列のはじめから開始して<a href="#find-a">数を探します</a>。
463    
464    #en
465    If the sub-algorithm in step 2 returned nothing or returned an error
466        condition, return nothing and abort these steps.
467    #ja
468    段階 2 の部分算法が何も返さなかったか、誤り条件を返した場合には、
469    何も返さず、これらの段階を停止します。
470    
471    #en
472    Set <var title="">number1</var> to the number returned by the
473        sub-algorithm in step 2.
474    #ja
475    <var title="">number1</var> を、段階 2 の部分算法が返した数とします。
476    
477    #en
478    Starting with the character immediately after the last one examined by
479        the sub-algorithm in step 2, skip any characters in the string that are
480        in the Unicode character class Zs (this might match zero characters). <a
481        href="#refsUNICODE">[UNICODE]</a>
482    #ja
483    段階 2 の部分算法が調べた最後の文字の直後の文字から始めて、文字列中の Unicode
484    文字クラス Zs の文字を飛ばします (これに一致するのは零文字かもしれません)。 <a
485        href="#refsUNICODE">[UNICODE]</a>
486    
487    #en
488    If there are still further characters in the string, and the next
489        character in the string is a <a href="#valid2">valid denominator
490        punctuation character</a>, set <var title="">denominator</var> to that
491        character.
492    #ja
493    文字列中に更に文字がまだある場合で、文字列中の次の文字が<a href="#valid2">妥当な分母句読点文字</a>である場合には、
494    <var title="">denominator</var> をその文字に設定します。
495    
496    #en
497    If the string contains any other characters in the range U+0030 DIGIT
498        ZERO to U+0039 DIGIT NINE, but <var title="">denominator</var> was given
499        a value in the step 6, return nothing and abort these steps.
500    #ja
501    文字列が範囲 U+0030 DIGIT
502        ZERO ~ U+0039 DIGIT NINE の文字をまだ他に含んでいる場合で、
503    段階 6 で <var title="">denominator</var> に値が与えられた場合には、
504    何も返さず、これらの段階を停止します。
505    
506    #en
507    Otherwise, if <var title="">denominator</var> was given a value in
508        step 6, return <var title="">number1</var> and <var
509        title="">denominator</var> and abort these steps.
510    #ja
511    そうでない場合、 <var title="">denominator</var> が段階 6
512    で値を与えられた場合には、 <var title="">number1</var> と <var
513        title="">denominator</var> を返し、これらの段階を停止します。
514    
515    #en
516    <a href="#find-a">Find a number</a> in the string again, starting
517        immediately after the last character that was examined by the
518        sub-algorithm in step 2.
519    #ja
520    文字列中を更に<a href="#find-a">数を探します</a>が、
521    段階 2 の部分算法で調べた最後の文字の直後からはじめます。
522    
523    #en
524    If the sub-algorithm in step 9 returned nothing or an error condition,
525        return nothing and abort these steps.
526    #ja
527    段階 9 の部分算法が何も返さないか、誤り条件を返す場合、
528    何も返さず、これらの段階を停止します。
529    
530    #en
531    Set <var title="">number2</var> to the number returned by the
532        sub-algorithm in step 9.
533    #ja
534    <var title="">number2</var> を、段階 9 の部分算法が返した数とします。
535    
536    #en
537    If there are still further characters in the string, and the next
538        character in the string is a <a href="#valid2">valid denominator
539        punctuation character</a>, return nothing and abort these steps.
540    #ja
541    文字列中に更に文字がまだある場合で、文字列中の次の文字が<a href="#valid2">妥当な分母句読点文字</a>である場合、
542    何も返さず、これらの段階を停止します。
543    
544    #en
545    If the string contains any other characters in the range U+0030 DIGIT
546        ZERO to U+0039 DIGIT NINE, return nothing and abort these steps.
547    #ja
548    文字列が範囲 U+0030 DIGIT
549        ZERO ~ U+0039 DIGIT NINE の文字をまだ他に含んでいる場合、
550    何も返さず、これらの段階を停止します。
551    
552    #en
553    Otherwise, return <var title="">number1</var> and <var
554        title="">number2</var>.
555    #ja
556    そうでない場合、 <var title="">number1</var> と <var
557        title="">number2</var> を返します。
558    
559    #en
560    The algorithm to <dfn id=find-a>find a number</dfn> is as follows. It is
561       given a string and a starting position, and returns either nothing, a
562       number, or an error condition.
563    #ja
564    <dfn id=find-a>数を探す</dfn>ための算法は次の通りです。
565    この算法は、文字列と開始位置を与えられ、
566    何も返さないか、数を返すか、誤り条件を返すかのいずれかです。
567    
568    #en
569    Starting at the given starting position, ignore all characters in the
570        given string until the first character that is either a U+002E FULL STOP
571        or one of the ten characters in the range U+0030 DIGIT ZERO to U+0039
572        DIGIT NINE.
573    #ja
574    与えられた開始位置からはじめ、 U+002E FULL STOP か、範囲 U+0030 DIGIT ZERO ~ U+0039
575        DIGIT NINE の10文字のいずれかであるような最初の文字まで、
576    その文字列中のすべての文字を無視します。
577    
578    #en
579    If there are no such characters, return nothing and abort these steps.
580    #ja
581    そのような文字がない場合には、何も返さず、これらの段階を停止します。
582    
583    #en
584    Starting with the character matched in step 1, collect all the
585        consecutive characters that are either a U+002E FULL STOP or one of the
586        ten characters in the range U+0030 DIGIT ZERO to U+0039 DIGIT NINE, and
587        assign this string of one or more characters to <var
588        title="">string</var>.
589    #ja
590    段階 1 で一致した文字からはじめ、 U+002E FULL STOP か、範囲 U+0030 DIGIT ZERO ~
591    U+0039 DIGIT NINE の10文字のいずれかであるような連続した文字群をすべて集め、
592    この1文字以上の文字からなる文字列を <var
593        title="">string</var> に代入します。
594    
595    #en
596    If <var title="">string</var> contains more than one U+002E FULL STOP
597        character then return an error condition and abort these steps.
598    #ja
599    <var title="">string</var> が U+002E FULL STOP
600    文字を複数含んでいる場合、誤り条件を返し、これらの段階を停止します。
601    
602    #en
603    Parse <var title="">string</var> according to the <a
604        href="#rules1">rules for parsing floating point number values</a>, to
605        obtain <var title="">number</var>. This step cannot fail (<var
606        title="">string</var> is guaranteed to be a <a href="#valid1">valid
607        floating point number</a>).
608    #ja
609    <var title="">string</var> を<a
610        href="#rules1">浮動小数点数値を構文解析する規則</a>により構文解析し、
611    <var title="">number</var> を得ます。この段階は失敗しません (<var
612        title="">string</var> は<a href="#valid1">妥当な浮動小数点数</a>であることが保証されています)。
613    
614    #en
615    Return <var title="">number</var>.
616    #ja
617    <var title="">number</var> を返します。
618    
619    #pattern
620    <span class=secno>*
621       </span>Percentages and dimensions
622    #ja
623    <span class=secno>$1
624       </span>百分率と寸法
625    
626    #pattern
627    <span class=secno>* </span>Lists of integers
628    #ja
629    <span class=secno>$1 </span>整数のリスト
630    
631    #en
632    A <dfn id=valid4>valid list of integers</dfn> is a number of <a
633       href="#valid0" title="valid integer">valid integers</a> separated by
634       U+002C COMMA characters, with no other characters (e.g. no <a
635       href="#space" title="space character">space characters</a>). In addition,
636       there might be restrictions on the number of integers that can be given,
637       or on the range of values allowed.
638    #ja
639    <dfn id=valid4>妥当な整数の並び</dfn>は、 U+002C COMMA
640    文字で分離された数々の<a
641       href="#valid0" title="valid integer">妥当な整数</a>であって、
642    他の文字を含まない (例えば<a
643       href="#space" title="space character">間隔文字</a>を含まない) ものです。
644    加えて、与えられる整数の数や認められる値の範囲に制限が設けられることがあります。
645    
646    #en
647    The <dfn id=rules3>rules for parsing a list of integers</dfn> are as
648       follows:
649    #ja
650    <dfn id=rules3>整数のリストを構文解析する規則</dfn>は次の通りです。
651    
652    #en
653    Let <var title="">numbers</var> be an initially empty list of
654         integers. This list will be the result of this algorithm.
655    #ja
656    <var title="">numbers</var> を、初期状態として、空の整数のリストとします。
657    このリストは、この算法の結果となります。
658    
659    #en
660    If there is a character in the string <var title="">input</var> at
661         position <var title="">position</var>, and it is either a U+0020 SPACE,
662         U+002C COMMA, or U+003B SEMICOLON character, then advance <var
663         title="">position</var> to the next character in <var
664         title="">input</var>, or to beyond the end of the string if there are no
665         more characters.
666    #ja
667    文字列 <var title="">input</var> の位置 <var title="">position</var>
668    に文字があり、これが U+0020 SPACE、U+002C COMMA、 U+003B SEMICOLON
669    のいずれかの文字であれば、 <var
670         title="">position</var> を <var
671         title="">input</var> 中の次の文字に進めるか、それ以上文字がないのであれば文字列の終わりを過ぎたとします。
672    
673    #en
674    Advance <var
675         title="">position</var> to the next character in <var
676         title="">input</var>, or to beyond the end of the string if there are no
677         more characters.
678    #ja
679    <var
680         title="">position</var> を <var
681         title="">input</var> 中の次の文字に進めるか、それ以上文字がないのであれば文字列の終わりを過ぎたとします。
682    
683    #en
684    If <var title="">position</var> points to beyond the end of <var
685         title="">input</var>, return <var title="">numbers</var> and abort.
686    #ja
687    <var title="">position</var> が <var
688         title="">input</var> の終わりを過ぎた先を指していれば、
689    <var title="">numbers</var> を返し、停止します。
690    
691    #en
692    If the character in the string <var title="">input</var> at position
693         <var title="">position</var> is a U+0020 SPACE, U+002C COMMA, or U+003B
694         SEMICOLON character, then return to step 4.
695    #ja
696    文字列 <var title="">input</var> の位置 <var title="">position</var>
697    が U+0020 SPACE、U+002C COMMA、U+003B
698         SEMICOLON のいずれかの文字であれば、段階 4 に戻ります。
699    
700    #en
701    Let <var title="">value</var> be 0.
702    #ja
703    <var title="">value</var> を 0 とします。
704    
705    #en
706    Let <var title="">started</var> be false. This variable is set to true
707         when the parser sees a number or a "<code title="">-</code>" character.
708    #ja
709    <var title="">started</var> を偽とします。この変数は、
710    構文解析器が数か「<code title="">-</code>」文字を見たときに真に設定されます。
711    
712    #en
713    Let <var title="">got number</var> be false. This variable is set to
714         true when the parser sees a number.
715    #ja
716    <var title="">got number</var> を偽とします。この変数は構文解析器が数を見たときに真に設定されます。
717    
718    #en
719    Let <var title="">finished</var> be false. This variable is set to
720         true to switch parser into a mode where it ignores characters until the
721         next separator.
722    #ja
723    <var title="">finished</var> を偽とします。この変数は構文解析器が次の分離子まで文字を無視するモードに切り替わったとき真に設定されます。
724    
725    #en
726    <em>Parser:</em> If the character in the string <var
727         title="">input</var> at position <var title="">position</var> is:
728    #ja
729    <em>構文解析器:</em> 文字列 <var
730         title="">input</var> 位置 <var title="">position</var>
731    の文字が、
732    
733    #en
734    A U+002D HYPHEN-MINUS character
735    #ja
736    U+002D HYPHEN-MINUS 文字の場合
737    
738    #en
739    Follow these substeps:
740    #ja
741    次の部分段階に従います。
742    
743    #en
744    If <var title="">got number</var> is true, let <var
745            title="">finished</var> be true.
746    #ja
747    <var title="">got number</var> が真である場合、 <var
748            title="">finished</var> を真とします。
749    
750    #en
751    If <var title="">finished</var> is true, skip to the next step in
752            the overall set of steps.
753    #ja
754    <var title="">finished</var> が真であれる場合、全体の段階の集合のうちの次の段階に飛びます。
755    
756    #en
757    If <var title="">started</var> is true, let <var
758            title="">negated</var> be false.
759    #ja
760    <var title="">started</var> が真である場合、 <var
761            title="">negated</var> を偽とします。
762    
763    #en
764    Otherwise, if <var title="">started</var> is false and if <var
765            title="">bogus</var> is false, let <var title="">negated</var> be
766            true.
767    #ja
768    そうでない場合、<var title="">started</var> が偽であり、 <var
769            title="">bogus</var> が偽である場合、 <var title="">negated</var>
770    を真とします。
771    
772    #en
773    Let <var title="">started</var> be true.
774    #ja
775    <var title="">started</var> を真とします。
776    
777    #en
778    A character in the range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE
779    #ja
780    範囲 U+0030 DIGIT ZERO ~ U+0039 DIGIT NINE の文字の場合
781    
782    #en
783    Add the value of the digit, interpreted in base ten, to <var
784            title="">value</var>.
785    #ja
786    数字を十進数で解釈した場合の値を <var
787            title="">value</var> に加えます。
788    
789    #en
790    Let <var title="">got number</var> be true.
791    #ja
792    <var title="">got number</var> を真とします。
793    
794    #en
795    A U+0020 SPACE character
796    #ja
797    U+0020 SPACE 文字の場合
798    
799    #en
800    A U+002C COMMA character
801    #ja
802    U+002C COMMA 文字の場合
803    
804    #en
805    A U+003B SEMICOLON character
806    #ja
807    U+003B SEMICOLON 文字の場合
808    
809    #en
810    If <var title="">got number</var> is false, return the <var
811            title="">numbers</var> list and abort. This happens if an entry in
812            the list has no digits, as in "<code title="">1,2,x,4</code>".
813    #ja
814    <var title="">got number</var> が偽の場合、 <var
815            title="">numbers</var> リストを返し、停止します。
816    これは、「<code title="">1,2,x,4</code>」のようにリスト中の項目が数字を持たない場合に起こります。
817    
818    #en
819    Return the <var
820            title="">numbers</var> list and abort.
821    #ja
822    <var
823            title="">numbers</var> リストを返し、停止します。
824    
825    #en
826    If <var title="">negated</var> is true, then negate <var
827            title="">value</var>.
828    #ja
829    <var title="">negated</var> が真の場合、 <var
830            title="">value</var> を負にします。
831    
832    #en
833    Append <var title="">value</var> to the <var
834            title="">numbers</var> list.
835    #ja
836    <var title="">value</var> を <var
837            title="">numbers</var> リストの末尾に追加します。
838    
839    #en
840    Jump to step 4 in the overall set of steps.
841    #ja
842    全体の段階の集合のうちの段階 4 に飛びます。
843    
844    #en
845    A U+002E FULL STOP character
846    #ja
847    U+002E FULL STOP 文字の場合
848    
849    #en
850    Any other character
851    #ja
852    その他の文字の場合
853    
854    #en
855    Let <var title="">bogus</var> be true.
856    #ja
857    <var title="">bogus</var> を真とします。
858    
859    #en
860    If <var title="">started</var> is true, then return the <var
861            title="">numbers</var> list, and abort. (The value in <var
862            title="">value</var> is not appended to the list first; it is
863            dropped.)
864    #ja
865    <var title="">started</var> が真の場合、 <var
866            title="">numbers</var> リストを返し、停止します。
867    (<var
868            title="">value</var> の値はリストに最初に追加されてはいません。
869    捨てられます。)
870    
871    #en
872    If <var title="">position</var> points to a character (and not to
873         beyond the end of <var title="">input</var>), jump to the big
874         <em>Parser</em> step above.
875    #ja
876    <var title="">position</var> が文字を指す場合 (で
877    <var title="">input</var> の終わりを過ぎていない場合)、
878    先の大段階<em>構文解析器</em>に飛びます。
879    
880    #pattern
881    <span class=secno>* </span>Dates and times
882    #ja
883    <span class=secno>$1 </span>日付と時刻
884    
885    #en
886    In the algorithms below, the <dfn id=number>number of days in month <var
887       title="">month</var> of year <var title="">year</var></dfn> is:
888       <em>31</em> if <var title="">month</var> is 1, 3, 5, 7, 8, 10, or 12;
889       <em>30</em> if <var title="">month</var> is 4, 6, 9, or 11; <em>29</em> if
890       <var title="">month</var> is 2 and <var title="">year</var> is a number
891       divisible by 400, or if <var title="">year</var> is a number divisible by
892       4 but not by 100; and <em>28</em> otherwise. This takes into account leap
893       years in the Gregorian calendar. <a href="#refsGREGORIAN">[GREGORIAN]</a>
894    #ja
895    後述の算法において、<dfn id=number>年 <var title="">year</var> の月 <var
896       title="">month</var> の日の数</dfn>は、
897    <var title="">month</var> が 1、3、5、7、8、10、12 のいずれかであれば
898       <em>31</em>、
899    <var title="">month</var> が 4、6、9、11 のいずれかであれば
900       <em>30</em>、
901    <var title="">month</var> が 2 で <var title="">year</var> が
902    400 で割り切れる数であるか、 <var title="">year</var> が 4 で割り切れるものの 100
903    では割り切れない数であれば <em>29</em>、
904    いずれでもなければ <em>28</em> です。これはグレゴリオ暦の閏年を考慮しています。
905    <a href="#refsGREGORIAN">[GREGORIAN]</a>
906    
907    #pattern
908    <span class=secno>* </span>Specific moments in time
909    #ja
910    <span class=secno>$1 </span>特定の時刻
911    
912    #en
913    A string is a <dfn id=valid5>valid datetime</dfn> if it has four digits
914       (representing the year), a literal hyphen, two digits (representing the
915       month), a literal hyphen, two digits (representing the day), optionally
916       some spaces, either a literal T or a space, optionally some more spaces,
917       two digits (for the hour), a colon, two digits (the minutes), optionally
918       the seconds (which, if included, must consist of another colon, two digits
919       (the integer part of the seconds), and optionally a decimal point followed
920       by one or more digits (for the fractional part of the seconds)),
921       optionally some spaces, and finally either a literal Z (indicating the
922       time zone is UTC), or, a plus sign or a minus sign followed by two digits,
923       a colon, and two digits (for the sign, the hours and minutes of the
924       timezone offset respectively); with the month-day combination being a
925       valid date in the given year according to the Gregorian calendar, the hour
926       values (<var title="">h</var>) being in the range 0&nbsp;&le;&nbsp;<var
927       title="">h</var>&nbsp;&le;&nbsp;23, the minute values (<var
928       title="">m</var>) in the range 0&nbsp;&le;&nbsp;<var
929       title="">m</var>&nbsp;&le;&nbsp;59, and the second value (<var
930       title="">s</var>) being in the range 0&nbsp;&le;&nbsp;<var
931       title="">h</var>&nbsp;&lt;&nbsp;60. <a
932       href="#refsGREGORIAN">[GREGORIAN]</a>
933    #ja
934    文字列が<dfn id=valid5>妥当な日時</dfn>であるとは、4つの数字
935    (年を表します。)、ハイフン文字、2つの数字 (月を表します。)、
936    ハイフン文字、2つの数字 (日を表します。)、任意選択でいくらかの間隔、
937    文字 T または間隔、任意選択でいくらかの間隔、
938    2つの数字 (時)、コロン、2つの数字 (分)、
939    任意選択で秒 (これが含まれる場合、再度コロンの後に2つの数字
940    (秒の整数部)、任意選択で小数点の後に1つ以上の数字 (秒の小数部)
941    で構成されなければ[[MUST:なりません]]。)、
942    任意選択でいくらかの間隔、そして最後に Z 文字 (時間帯が UTC であることを示します。)
943    か、または正符号か負符号、2つの数字、コロン、2つの数字 (それぞれ時差の符号、
944    時、分) の並びのいずれか、これらを持つことをいいます。
945    ただし、月と日の組み合わせが当該年のグレゴリオ暦に照らして妥当な日付であり、
946    時の値 (<var title="">h</var>) が範囲 0&nbsp;&le;&nbsp;<var
947       title="">h</var>&nbsp;&le;&nbsp;23 に、分の値 (<var
948       title="">m</var>) が範囲 0&nbsp;&le;&nbsp;<var
949       title="">m</var>&nbsp;&le;&nbsp;59 に、秒の値 (<var
950       title="">s</var>) が範囲 0&nbsp;&le;&nbsp;<var
951       title="">h</var>&nbsp;&lt;&nbsp;60 にあることとします。 <a
952       href="#refsGREGORIAN">[GREGORIAN]</a>
953    
954    #en
955    The digits must be characters in the range U+0030 DIGIT ZERO (0) to
956       U+0039 DIGIT NINE (9), the hyphens must be a U+002D HYPHEN-MINUS
957       characters, the T must be a U+0054 LATIN CAPITAL LETTER T, the colons must
958       be U+003A COLON characters, the decimal point must be a U+002E FULL STOP,
959       the Z must be a U+005A LATIN CAPITAL LETTER Z, the plus sign must be a
960       U+002B PLUS SIGN, and the minus U+002D (same as the hyphen).
961    #ja
962    数字は範囲 U+0030 DIGIT ZERO (0) ~
963       U+0039 DIGIT NINE (9) の文字でなければ[[MUST:ならず]]、ハイフンは
964    U+002D HYPHEN-MINUS 文字でなければ[[MUST:ならず]]、
965    T は U+0054 LATIN CAPITAL LETTER T でなければ[[MUST:ならず]]、
966    コロンは U+003A COLON 文字でなければ[[MUST:ならず]]、
967    小数点は U+002E FULL STOP でなければ[[MUST:ならず]]、
968    Z は U+005A LATIN CAPITAL LETTER Z でなければ[[MUST:ならず]]、
969    正符号は U+002B PLUS SIGN、負符号は
970    U+002D (ハイフンと同じ) でなければ[[MUST:なりません]]。
971    
972    #en
973    The following are some examples of dates written as <a href="#valid5"
974        title="valid datetime">valid datetimes</a>.
975    #ja
976    次に示すのは、<a href="#valid5"
977        title="valid datetime">妥当な日時</a>として書かれた日付の例です。
978    
979    #pattern
980    "<code>*</code>"
981    #ja
982    「<code>$1</code>」
983    
984    #en
985    Midnight UTC on the birthday of Nero (the Roman Emperor).
986    #ja
987    ネロ (ローマ皇帝) の誕生日の UTC における真夜中
988    
989    #en
990    One millisecond after noon on October 14th 1979, in the time zone in
991         use on the east coast of North America during daylight saving time.
992    #ja
993    北米大陸東海岸の夏時刻適用中における1979年10月14日の正午の1ミリ秒後
994    
995    #en
996    Midnight UTC on the 1st of January, 8592. The time zone associated
997         with that time is two hours and nine minutes ahead of UTC.
998    #ja
999    8592年1月1日の UC にける真夜中。
1000    時間帯は UTC から2時間9分進んだもの。
1001    
1002    #en
1003    Several things are notable about these dates:
1004    #ja
1005    これらの日付に関して、いくつか注意点があります。
1006    
1007    #en
1008    Years with fewer than four digits have to be zero-padded. The date
1009         "37-12-13" would not be a valid date.
1010    #ja
1011    4桁に満たない年は零埋めする必要があります。「37-12-13」
1012    は妥当な日付ではありません。
1013    
1014    #en
1015    To unambiguously identify a moment in time prior to the introduction
1016         of the Gregorian calendar, the date has to be first converted to the
1017         Gregorian calendar from the calendar in use at the time (e.g. from the
1018         Julian calendar). The date of Nero's birth is the 15th of December 37,
1019         in the Julian Calendar, which is the 13th of December 37 in the
1020         Gregorian Calendar.
1021    #ja
1022    グレゴリオ暦導入以前の時刻を曖昧なく識別するためには、その時刻を当時の暦
1023    (例えばユリウス暦) からグレゴリオ暦に変換する必要があります。
1024    ネロの誕生日はユリウス暦では37年12月15日ですが、
1025    この日はグレゴリオ暦の37年12月13日にあたります。
1026    
1027    #en
1028    The time and timezone components are not optional.
1029    #ja
1030    時刻や時間帯の部品は省略可能ではありません。
1031    
1032    #en
1033    Dates before the year 0 or after the year 9999 can't be represented
1034         as a datetime in this version of HTML.
1035    #ja
1036    0年より前や9999年より後の日付はこの版の HTML の日時としては表現できません。
1037    
1038    #en
1039    Time zones differ based on daylight savings time.
1040    #ja
1041    時間帯は夏時刻制によって異なります。
1042    
1043    #en
1044    Conformance checkers can use the algorithm below to determine
1045       if a datetime is a valid datetime or not.
1046    #ja
1047    適合性検査器は時刻が妥当な時刻かどうかを決定するために後述の算法を使うことができます。
1048    
1049    
1050    
1051    #en
1052    <a href="#collect">Collect a sequence of characters</a> that are
1053         either U+0054 LATIN CAPITAL LETTER T characters or <a href="#space"
1054         title="space character">space characters</a>. If the collected sequence
1055         is zero characters long, or if it contains more than one U+0054 LATIN
1056         CAPITAL LETTER T character, then fail.
1057    #ja
1058    U+0054 LATIN CAPITAL LETTER T 文字であるか、または<a href="#space"
1059         title="space character">間隔文字</a>である<a href="#collect">文字の列を集めます</a>。
1060    集めた列が零文字長の場合、または複数の U+0054 LATIN
1061         CAPITAL LETTER T 文字を含む場合、失敗します。
1062    
1063    #en
1064    If <var title="">hour</var> is not a number in the range
1065        0&nbsp;&le;&nbsp;<var title="">hour</var>&nbsp;&le;&nbsp;23, then fail.
1066    #ja
1067    <var title="">hour</var> が範囲 0&nbsp;&le;&nbsp;<var title="">hour</var>&nbsp;&le;&nbsp;23
1068    の数でない場合、失敗します。
1069    
1070    #en
1071    If <var title="">position</var> is beyond the end of <var
1072         title="">input</var> or if the character at <var title="">position</var>
1073         is not a U+003A COLON character, then fail. Otherwise, move <var
1074         title="">position</var> forwards one character.
1075    #ja
1076    <var title="">position</var> が <var
1077         title="">input</var> の終わりを過ぎている場合、
1078    または <var title="">position</var> の文字が U+003A COLON
1079    文字でない場合、失敗します。
1080    そうでない場合、 <var
1081         title="">position</var> を1文字先へ進めます。
1082    
1083    #en
1084    If <var title="">minute</var> is not a number in the range
1085        0&nbsp;&le;&nbsp;<var title="">minute</var>&nbsp;&le;&nbsp;59, then fail.
1086    #ja
1087    <var title="">minute</var> が範囲
1088    0&nbsp;&le;&nbsp;<var title="">minute</var>&nbsp;&le;&nbsp;59
1089    の数でない場合、失敗します。
1090    
1091    #en
1092    Let <var title="">second</var> be a string with the value "0".
1093  #ja  #ja
1094  <span class=secno>$1 </span>共通マイクロ構文  <var title="">second</var> を、値「0」の文字列とします。
1095    
1096  #en  #en
1097    There are various places in HTML that accept particular data types, such  If <var title="">position</var> is beyond the end of <var
1098     as dates or numbers. This section describes what the conformance criteria       title="">input</var>, then fail.
    for content in those formats is, and how to parse them.  
1099  #ja  #ja
1100  HTML 中のいろいろな場所で、日付や数値のような特定のデータ型を使うことができます。  <var title="">position</var> が <var
1101  この節では、そのような書式の内容の適合基準は何か、       title="">input</var> の終わりを過ぎている場合、失敗します。
 どう構文解析するかを説明します。  
   
 #en  
   Need to go through the whole spec and make sure all the  
    attribute values are clearly defined either in terms of microsyntaxes or  
    in terms of other specs, or as "Text" or some such.  
 #ja  
 仕様書全体について、すべての属性値がマイクロ構文を使ってか他の仕様書を使ってか「文章」などとして定義されるようにする必要があります。  
   
 #regexp  
 <span class=secno>* </span>Common parser idioms  
 #ja  
 <span class=secno>$1 </span>構文解析器共通慣用句  
   
 #en  
   The <dfn id=space title="space character">space characters</dfn>, for  
    the purposes of this specification, are U+0020 SPACE, U+0009 CHARACTER  
    TABULATION (tab), U+000A LINE FEED (LF), U+000C FORM FEED (FF), and U+000D  
    CARRIAGE RETURN (CR).  
 #ja  
 <dfn id=space title="space character">間隔文字</dfn>は、  
 この仕様書においては、 U+0020 SPACE, U+0009 CHARACTER  
    TABULATION (tab)、U+000A LINE FEED (LF)、U+000C FORM FEED (FF)、 U+000D  
    CARRIAGE RETURN (CR) です。  
   
 #en  
   Some of the micro-parsers described below follow the pattern of having  
    an <var title="">input</var> variable that holds the string being parsed,  
    and having a <var title="">position</var> variable pointing at the next  
    character to parse in <var title="">input</var>.  
 #ja  
 これ以降で説明するマイクロ構文解析器のいくつかは、構文解析される文字列を保持する  
 <var title="">input</var> 変数を持ち、 <var title="">input</var>  
 中で次に構文解析する文字を指す <var title="">position</var>  
 変数を持つというパターンに従っています。  
   
 #en  
   For parsers based on this pattern, a step that requires the user agent  
    to <dfn id=collect>collect a sequence of characters</dfn> means that the  
    following algorithm must be run, with <var title="">characters</var> being  
    the set of characters that can be collected:  
 #ja  
 このパターンに従う構文解析器において、利用者エージェントが<dfn id=collect>文字列を集める</dfn>ことを要求している段階は、  
 次の算法を、 <var title="">characters</var>  
 が収集できる文字の集合であるとして実行しなければ[[MUST:ならない]]ことを意味しています。  
   
 #en  
     Let <var title="">input</var> and <var title="">position</var> be the  
      same variables as those of the same name in the algorithm that invoked  
      these steps.  
 #ja  
 <var title="">input</var> と <var title="">position</var>  
 を、これらの段階を呼び出した算法中の同名の変数と同じものとします。  
   
 #en  
 Let <var title="">result</var> be the empty string.  
 #ja  
 <var title="">result</var> を空文字列とします。  
   
 #en  
     While <var title="">position</var> doesn't point past the end of <var  
      title="">input</var> and the character at <var title="">position</var>  
      is one of the <var title="">characters</var>, append that character to  
      the end of <var title="">result</var> and advance <var  
      title="">position</var> to the next character in <var  
      title="">input</var>.  
 #ja  
 <var title="">position</var> が <var  
      title="">input</var> の終わりの更に先を指しておらず、 <var title="">position</var>  
 の文字が <var title="">characters</var> のうちの1つである間、  
 その文字を <var title="">result</var> の終わりに追加し、 <var  
      title="">position</var> を <var  
      title="">input</var> の次の文字に進めます。  
   
 #en  
     Return <var title="">result</var>.  
 #ja  
 <var title="">result</var> を返します。  
   
 #en  
   The step <dfn id=skip-whitespace>skip whitespace</dfn> means that the  
    user agent must <a href="#collect">collect a sequence of characters</a>  
    that are <a href="#space" title="space character">space characters</a>.  
    The step <dfn id=skip->skip Zs characters</dfn> means that the user agent  
    must <a href="#collect">collect a sequence of characters</a> that are in  
    the Unicode character class Zs. In both cases, the collected characters  
    are not used. <a href="#refsUNICODE">[UNICODE]</a>  
 #ja  
 <dfn id=skip-whitespace>空白を飛ばす</dfn>段階は、  
 利用者エージェントが<a href="#space" title="space character">間隔文字</a>である<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。  
 <dfn id=skip->Zs 文字を飛ばす</dfn>段階は、  
 利用者エージェントが Unicode 文字クラス Zs に含まれる<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。<a href="#collect">文字列を集め</a>なければ[[MUST:ならない]]ことを意味します。  
 どちらの場合も、集めた文字は使いません。 <a href="#refsUNICODE">[UNICODE]</a>  
   
 #regexp  
 <span class=secno>* </span>Boolean attributes  
 #ja  
 <span class=secno>$1 </span>ブール型属性  
   
 #en  
   A number of attributes in HTML5 are <dfn id=boolean0 title="boolean  
    attribute">boolean attributes</dfn>. The presence of a boolean attribute  
    on an element represents the true value, and the absence of the attribute  
    represents the false value.  
 #ja  
 HTML5 の数々の属性は<dfn id=boolean0 title="boolean  
    attribute">ブール型属性</dfn>です。要素にブール型属性が存在すると真の値を表し、  
 存在しないと偽の値を表します。  
   
 #en  
   If the attribute is present, its value must either be the empty string  
    or a value that is a case-insensitive <!-- XXX ASCII --> match for the  
    attribute's canonical name, with no leading or trailing whitespace.  
 #ja  
 属性が存在する場合、値は、  
 空文字列か大文字・小文字を区別しないと属性の正準名と一致する  
 (先頭にも末尾にも空白がない) 値のいずれかでなければ[[MUST:なりません]]。  
   
 #regexp  
 <span class=secno>* </span>Numbers  
 #ja  
 <span class=secno>$1 </span>数値  
   
 #regexp  
 <span class=secno>* </span>Unsigned integers  
 #ja  
 <span class=secno>$1 </span>符号無し整数  
   
 #en  
 A string is a <dfn id=valid0>valid non-negative integer</dfn> if it  
    consists of one of more characters in the range U+0030 DIGIT ZERO (0) to  
    U+0039 DIGIT NINE (9).  
 #ja  
 文字列は、範囲 U+0030 DIGIT ZERO (0) から U+0039 DIGIT NINE (9)  
 までの文字1文字以上で構成される場合、<dfn id=valid0>妥当な非負整数</dfn>です。  
   
 #en  
 The <dfn id=rules>rules for parsing non-negative integers</dfn> are as  
    given in the following algorithm. When invoked, the steps must be followed  
    in the order given, aborting at the first step that returns a value. This  
    algorithm will either return zero, a positive integer, or an error.  
    Leading spaces are ignored. Trailing spaces and indeed any trailing  
    garbage characters are ignored.  
 #ja  
 <dfn id=rules>非負整数を構文解析する規則</dfn>は次の算法で与えられるものです。  
 この算法が呼び出された時には、与えられた順に段階に従い、  
 値を返す最初の段階で中断しなければ[[MUST:なりません]]。  
 この算法は零か正整数か誤りを返します。  
 先頭の間隔は無視されます。末尾の空白、というかごみ文字列はすべて無視されます。  
   
 #en  
     Let <var title="">input</var> be the string being parsed.  
 #ja  
 <var title="">input</var> を構文解析される文字列とします。  
   
 #en  
     Let <var title="">position</var> be a pointer into <var  
      title="">input</var>, initially pointing at the start of the string.  
 #ja  
 <var title="">position</var> を <var  
      title="">input</var> 中の指示子とし、初期位置を文字列の始めとします。  
   
 #en  
    Let <var title="">value</var> have the value 0.  
 #ja  
 <var title="">value</var> を値 0 にします。  
   
 #en  
     <a href="#skip-whitespace">Skip whitespace.</a>  
 #ja  
     <a href="#skip-whitespace">空白を読み飛ばします。</a>  
   
 #en  
     If <var title="">position</var> is past the end of <var  
      title="">input</var>, return an error.  
 #ja  
 <var title="">position</var> が <var  
      title="">input</var> の終わりを過ぎていれば、誤りを返します。  
   
 #en  
     If the next character is not one of U+0030 DIGIT ZERO (0) .. U+0039  
      DIGIT NINE (9), then return an error.  
 #ja  
 次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039  
      DIGIT NINE (9) のうちの1つでない場合、誤りを返します。  
   
 #en  
     If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT  
      NINE (9):  
 #ja  
 次の文字が U+0030 DIGIT ZERO (0) 〜 U+0039  
      DIGIT NINE (9) のうちの1つである場合:  
   
 #en  
      Multiply <var title="">value</var> by ten.  
 #ja  
 <var title="">value</var> を10倍します。  
   
 #en  
       Add the value of the current character (0..9) to <var  
       title="">value</var>.  
 #ja  
 現在の文字の値 (0〜9) を <var  
       title="">value</var> に加えます。  
   
 #en  
      Advance <var title="">position</var> to the next character.  
 #ja  
 <var title="">position</var> を次の文字に進めます。  
   
 #regexp  
      If <var title="">position</var> is not past the end of <var  
       title="">input</var>, return to the top of step * in the overall  
       algorithm (that's the step within which these substeps find  
       themselves).  
 #ja  
 <var title="">position</var> が <var  
       title="">input</var> の終わりを過ぎていなければ、  
 算法全体の段階 $1 (これらの部分段階自体が含まれている段階) の先頭に返ります。  
   
 #en  
     Return <var title="">value</var>.  
 #ja  
 <var title="">value</var> を返します。  

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24