/[suikacvs]/markup/selectors/ssft/ssft-work.en.html
Suika

Contents of /markup/selectors/ssft/ssft-work.en.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations) (download) (as text)
Mon Oct 15 01:00:52 2007 UTC (16 years, 7 months ago) by wakaba
Branch: MAIN
Changes since 1.9: +9 -7 lines
File MIME type: text/html
RFC 2119 terms are marked up as definitions

1 wakaba 1.1 <!DOCTYPE html>
2     <html lang="en" class="formal-specification status-work-in-progress">
3     <head>
4 wakaba 1.2 <title>Selectors Serialization Format for Testing (SSFT) Specification</title>
5 wakaba 1.1 <link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec">
6     <link rel="license" href="http://suika.fam.cx/c/gnu/fdl">
7     </head>
8     <body class="has-abstract">
9    
10     <div class="header">
11 wakaba 1.2 <h1>Selectors Serialization Format for Testing (<abbr>SSFT</abbr>)
12     Specification</h1>
13 wakaba 1.8 <h2>Working Draft <time datetime=2007-10-15>15 October 2007</time></h2>
14 wakaba 1.1
15     <dl class="versions-uri">
16     <dt>This Version</dt>
17     <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"
18     >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>
19     <dt>Latest Version</dt>
20     <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"
21     >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>
22     <!--
23     <dt>Latest Working Draft</dt>
24     -->
25     <!-- <dt>Previous Version</dt> -->
26 wakaba 1.5 <dt>Version History</dt>
27     <dd><code class=URI>&lt;<a href="http://suika.fam.cx/gate/cvs/markup/selectors/ssft/ssft.en.html">http://suika.fam.cx/gate/cvs/markup/selectors/ssft/ssft.en.html</a>&gt;</code></dd>
28 wakaba 1.1 </dl>
29     <dl class="authors" id="author">
30     <dt>Author</dt>
31     <dd><a href="http://suika.fam.cx/~wakaba/who?" rel="author"
32     lang=ja>Wakaba</a>
33     <code class="mail">&lt;<a href="mailto:w@suika.fam.cx" rel="author"
34     >w@suika.fam.cx</a>&gt;</code></dd>
35     </dl>
36    
37 wakaba 1.5 <p class="copyright" lang="en">&#xA9; <time>2007</time> <a
38 wakaba 1.1 href="http://suika.fam.cx/~wakaba/who?" rel="author">Wakaba</a>.
39     Permission is granted to copy, distribute and/or modify this document
40     under the terms of the <a rel="license"
41     href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>,
42     Version 1.2
43     or any later version published by the <a
44     href="http://www.fsf.org/">Free Software Foundation</a>;
45     with no Invariant Sections, no Front$B!>(BCover Texts, and no Back$B!>(BCover
46     Texts. A copy of the license is
47     available at <code class="URI">&lt;<a
48     href="http://www.gnu.org/copyleft/fdl.html"
49     rel="license">http://www.gnu.org/copyleft/fdl.html</a>&gt;</code>.</p>
50     </div>
51    
52     <div id="abstract" class="section">
53     <h2>Abstract</h2>
54    
55     <div class="ed issue">...</div>
56    
57     </div>
58    
59     <div id="status" class="section">
60     <h2>Status of This Document</h2>
61    
62 wakaba 1.5 <p class=section-info><em>This section describes the status of this document
63 wakaba 1.1 at the time of its publication. Other documents
64     might supersede this document.</em></p>
65    
66 wakaba 1.10 <p>This document is a working draft, produced as part of the
67     <a href="http://suika.fam.cx/www/markup/html/whatpm/readme">Whatpm</a>
68     subproject
69 wakaba 1.5 of the <a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a>
70     project. It might be updated, replaced, or obsoleted by
71 wakaba 1.1 other documents at any time. It is inappropriate to
72     cite this document as other than <q>work in progress</q>.</p>
73    
74     <p>Comments on this document are welcome and
75     may be sent to the <a href="#author">author</a>.</p>
76    
77     <p>Translations of thie document might be available.
78     The English version of the document is the only
79     normative version.</p>
80     </div>
81    
82     <div id="introduction" class="section">
83     <h2>Introduction</h2>
84    
85 wakaba 1.7 <p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p>
86 wakaba 1.5
87     <p>Selectors
88     <cite class="bibref normative">[<a href="#ref-SELECTORS">SELECTORS</a>]</cite>
89     are patterns that match against elements
90     in a tree structure and are used in Web technologies, including
91     <a href="http://www.w3.org/TR/CSS21"><abbr title="Cascading Style Sheets">CSS</abbr></a>
92     <cite class="bibref informative">[<a href="#ref-CSS">CSS</a>]</cite>,
93     <a href="http://whatwg.org/html5"><abbr title="Hypertext Markup Language">HTML</abbr>5</a>
94     <cite class="bibref informative">[<a href="#ref-HTML5">HTML5</a>]</cite>,
95     <a href="http://www.mozilla.org/projects/xbl/xbl2.html"><abbr title="XML Binding Language">XBL</abbr>2</a>
96     <cite class="bibref informative">[<a href="#ref-XBL2">XBL2</a>]</cite>, and
97     <a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/selectors-api/Overview.html?rev=1.28&amp;content-type=text/html;%20charset=utf-8">Selectors
98     <abbr>API</abbr></a>
99     <cite class="bibref informative">[<a href="#ref-SAPI">SAPI</a>]</cite>.</p>
100 wakaba 1.4
101 wakaba 1.1 <div class="issue ed">...</div>
102    
103 wakaba 1.4 <p><a href="http://dev.w3.org/cvsweb/csswg/cssom/Overview.html">The
104     <abbr title="Cascading Style Sheets Object Model">CSSOM</abbr>
105     specification</a>
106 wakaba 1.5 <cite class="bibref informative">[<a href="#ref-CSSOM">CSSOM</a>]</cite>
107 wakaba 1.4 is trying to define an algorithm to
108     <a href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.55&amp;content-type=text/html;%20charset=utf-8#serializing0">serialize
109     a group of selectors</a> for the purpose of <code>selectorText</code>
110     attribute. However, the algorithm is incomplete
111 wakaba 1.5 <time datetime=2007-09-25>at the time of the writing</time>.
112     Note that current Web browser implementations
113 wakaba 1.4 of the <code>selectorText</code> attribute are consistently broken
114     in not escaping unsafe identifiers.</p>
115    
116 wakaba 1.1 </div>
117    
118     <div class="section" id="terminology">
119     <h2>Terminology</h2>
120    
121 wakaba 1.10 <p>The key words <q><dfn id=must><em class="rfc2119">MUST</em></dfn></q>,
122     <q><dfn id=must-not><em class="rfc2119">MUST NOT</em></dfn></q>,
123     <q><dfn id=should><em class="rfc2119">SHOULD</em></dfn></q>,
124     <q><dfn id=should-not><em class="rfc2119">SHOULD NOT</em></dfn></q>, and
125     <q><dfn id=may><em class=rfc2119>MAY</em></dfn></q> in this
126 wakaba 1.1 document are to be interpreted as described in
127 wakaba 1.5 <a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr>
128     2119</a>
129 wakaba 1.1 <cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p>
130 wakaba 1.5
131     <!-- Strictly speaking the paragraph below is not part of terminology. -->
132 wakaba 1.7 <p>All examples and notes in this specification are non$B!>(Bnormative,
133     as are all sections explicitly marked non$B!>(Bnormative. Everything
134 wakaba 1.5 else in this specification is normative.</p>
135 wakaba 1.7
136     <p>For the purpose of this specification, pseudo$B!>(Belements are also
137     referred to as <dfn title="simple selector" id=simple-selector>simple
138     selectors</dfn> and are considered as part of the last sequence of
139     simple selector in a selector.</p>
140 wakaba 1.1 </div>
141    
142     <div class="section" id="serializing">
143     <h2>Serializing Groups of Selectors</h2>
144    
145     <div class="issue ed">
146     <p><a href="http://suika.fam.cx/gate/cvs/*checkout*/markup/html/whatpm/Whatpm/CSS/SelectorsSerializer.pm">See the reference implementation</a>
147     for now.</p>
148     </div>
149 wakaba 1.3
150 wakaba 1.8 <p>No <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
151     representation is defined for an invalid group of selectors.</p>
152    
153     <div class="note memo">
154     <p>The serialized representation will not contain any comment.</p>
155     </div>
156 wakaba 1.3
157 wakaba 1.4 <!-- TODO: link terms to Selectors -->
158    
159 wakaba 1.7 <p>To
160     <dfn id=algorithm-serialize-a-group-of-selectors title="serialize a group of selectors">serialize
161     a group of selectors (<dfn id=var-gs><var>gs</var></dfn>)</dfn>:</p>
162 wakaba 1.3 <ol>
163 wakaba 1.6 <li>Let <dfn id=var-result><var>result</var></dfn> an empty string.</li>
164     <li>For each selector (<dfn id=var-selector><var>selector</var></dfn>) in
165     <var>gs</var>:
166 wakaba 1.3 <ol>
167     <li>If <var>selector</var> is <em>not</em> the first selector
168     in the group of selectors, then append a <code class=char>U+002C</code>
169 wakaba 1.7 <code class=charname>COMMA</code> (<code class=char>,</code>) followed by a
170 wakaba 1.3 <a href="#newline">newline</a> to <var>result</var>.</li>
171     <li>Append four <code class=char>U+0020</code>
172     <code class=charname>SPACE</code> characters to <var>result</var>.</li>
173     <li>Process each sequence of simple selectors or
174     combinator in <var>selector</var> by following algorithm:
175     <dl class=switch>
176 wakaba 1.6 <dt>If it is a sequence of simle selector
177     (<dfn id=var-sss><var>sss</var></dfn>)</dt>
178 wakaba 1.9 <dd>
179     <ol>
180     <li class=ed><a href="#algorithm-serialize-a-simple-selector">Serialize
181     each simple selector</a> in <var>sss</var>.</li>
182     <li class=ed>sort</li>
183     <li>Append a <a href="#newline">newline</a> to <var>result</var>.</li>
184     </ol>
185     </dd>
186 wakaba 1.6 <dt>If it is a combinator (<dfn id=var-c><var>c</var></dfn>)</dt>
187 wakaba 1.3 <dd>
188     <ol>
189     <li>Append two <code class=char>U+0020</code>
190     <code class=charname>SPACE</code> characters to <var>result</var>.</li>
191     <li>
192     <dl class=switch>
193     <dt>If <var>c</var> is descendant combinator (white space)</dt>
194     <dd>Append a <code class=char>U+0020</code>
195     <code class=charname>SPACE</code> character to
196     <var>result</var>.</dd>
197     <dt>If <var>c</var> is child combinator
198     (<code class=char>></code>)</dt>
199     <dd>Append a <code class=char>U+003E</code>
200 wakaba 1.7 <code class=charname>GREATER-THAN SIGN</code>
201     (<code class=char>></code>) character to <var>result</var>.</dd>
202 wakaba 1.3 <dt>If <var>c</var> is adjacent sibling combinator
203     (<code class=char>+</code>)</dt>
204 wakaba 1.5 <dd>Append a <code class=char>U+002B</code>
205 wakaba 1.7 <code class=charname>PLUS SIGN</code> (<code class=char>+</code>)
206     character to <var>result</var>.</dd>
207 wakaba 1.3 <dt>If <var>c</var> is general sibling combinator
208     (<code class=char>~</code>)</dt>
209     <dd>Append a <code class=char>U+007E</code>
210 wakaba 1.7 <code class=charname>TILDE</code> (<code class=char>~</code>)
211     character to <var>result</var>.</dd>
212 wakaba 1.3 </dl>
213     </li>
214     <li>Append a <code class=char>U+0020</code>
215     <code class=charname>SPACE</code> character to
216     <var>result</var>.</li>
217     </ol>
218     </dd>
219     </dl>
220     </ol>
221     </li>
222     <li>Then, <var>result</var> is the
223 wakaba 1.8 <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
224     representation of <var>gs</var>.</li>
225 wakaba 1.3 </ol>
226 wakaba 1.6
227 wakaba 1.7 <p>To
228     <dfn id=algorithm-serialize-a-simple-selector title="serialize a simple selector">serialize
229     a simple selector (<dfn><var id=var-ss>ss</var></dfn>)</dfn>:</p>
230 wakaba 1.6 <dl class=switch>
231     <dt>If <var>ss</var> is a type or universal selector</dt>
232 wakaba 1.7 <dd>
233     <ol>
234     <li>
235     <dl class=switch>
236     <dt>If a namespace URI is specified (via namespace prefix, or
237     by omitting namespace prefix where a default namespace is specified)</dt>
238     <dd class="ed">@@</dd>
239     <dt>If the null namespace is specified (by zero$B!>(Blength namespace
240     prefix)</dt>
241     <dd>Append a <code class=char>U+007C</code>
242     <code class=charname>VERTICAL BAR</code> (<code class=char>|</code>)
243     character to <var>result</var>.</dd>
244     <dt>If no namespace is specified (by namespace prefix <code>*</code>,
245     or by omitting namespace prefix where no default namespace is
246     specified)</dt>
247     <dd>Append a <code class=char>U+002A</code>
248     <code class=charname>ASTERISK</code> (<code class=char>*</code>)
249     character, followed by a <code class=char>U+007C</code>
250     <code class=charname>VERTICAL BAR</code> (<code class=char>|</code>)
251     character, to <var>result</var>.</dd>
252     </dl>
253     </li>
254     <li>If <var>ss</var> is a type selector, append the
255     <span class=ed>@@ normalized</span> local name to <var>result</var>.</li>
256     <li>If <var>ss</var> is a universal selector, append
257     a <code class=char>U+002A</code> <code class=charname>ASTERISK</code>
258     (<code class=char>*</code>) character to <var>result</var>.</li>
259     </ol>
260     </dd>
261     <dt>If <var>ss</var> is an attribute selector</dt>
262 wakaba 1.9 <dd>
263     <ol>
264     <li>Append a <code class=char>U+005B</code> <code class=charname>LEFT
265     SQUARE BRACKET</code> (<code class=char>[</code>) to
266     <var>result</var>.</li>
267     <li>
268     Append a namespace prefix as following:
269     <dl>
270     <dt>If a namespace URI is specified</dt>
271     <dd class=ed>@@</dd>
272     <dd class=ed>@@ Current reference implementation is wrong,
273     since its result of sorting depends on namespace prefix.</dd>
274     <dt>If the null namespace is specified</dt>
275     <dd>Append a <code class=char>U+007C</code>
276     <code class=charname>VERTICAL BAR</code> character to
277     <var>result</var>.</dd>
278     <dt>If no namespace is specified</dt>
279     <dd>Append a <code class=char>U+002A</code>
280     <code class=charname>ASTERISK</code> (<code class=char>*</code>)
281     character, followed by a <code class=char>U+007C</code>
282     <code class=charname>VERTICAL BAR</code> (<code class=char>|</code>)
283     character, to <var>result</var>.</dd>
284     </dl>
285     </li>
286     <li>Append the <span class=ed>@@ normalized</span> local name to
287     <var>result</var>.</li>
288     <li>If a value is specified in <var>ss</var>:
289     <ol>
290     <li>Depending on the way to match, append <code>=</code>,
291     <code>~=</code>, <code>|=</code>, <code>^=</code>,
292     <code>$=</code>, or <code>*=</code> to <var>result</var>.</li>
293     <li>Append the <span class=ed>@@ normalized</span> value to
294     <var>result</var>.</li>
295     </ol>
296     </li>
297     <li>Append a <code class=char>U+005D</code> <code class=charname>RIGHT
298     SQUARE BRACKET</code> (<code class=char>]</code>) to
299     <var>result</var>.</li>
300     </ol>
301     </dd>
302 wakaba 1.7 <dt>If <var>ss</var> is a class selector</dt>
303     <dd>Append a <code class=char>U+002E</code> <code class=charname>FULL
304     STOP</code> (<code class=char>.</code>) character, followed
305     by <span class=ed>@@ normalized</span> class name,
306     <var>result</var>.</dd>
307     <dt>If <var>ss</var> is an <abbr>ID</abbr> selector</dt>
308     <dd>Append a <code class=char>U+0023</code> <code class=charname>NUMBER
309     SIGN</code> (<code class=char>#</code>) character, followed
310     by <span class=ed>@@ normalized</span> <abbr>ID</abbr>,
311     to <var>result</var>.</dd>
312     <dt>If <var>ss</var> is a pseudo$B!>(Bclass selector</dt>
313     <dd>
314     <ol>
315     <li>Append a <code class=char>U+003A</code>
316     <code class=charname>COLON</code> (<code class=char>:</code>) character
317     to <var>result</var>.</li>
318 wakaba 1.8 <li>Append the <span class=ed>@@ normalized</span> name of the
319     pseudo$B!>(Bclass to <var>result</var>.</li>
320 wakaba 1.7 <li>Append any arguments as following:
321     <dl class=switch>
322 wakaba 1.8 <dt>If the name of the pseudo$B!>(Bclass is <code>lang</code></dt>
323 wakaba 1.7 <dd>
324     <ol>
325     <li>Append a <code class=char>U+0028</code> <code class=charname>LEFT
326     PARENTHESIS</code> (<code class=char>(</code>) character
327     to <var>result</var>.</li>
328     <li>Append <span class=ed>@@ normalized</span>
329     language tag (the argument) to <var>result</var>.</li>
330     <li>Append a <code class=char>U+0029</code>
331     <code class=charname>RIGHT PARENTHESIS</code>
332     (<code class=char>)</code>) character
333     to <var>result</var>.</li>
334     </ol>
335     </dd>
336 wakaba 1.8 <dt>If the name of the pseudo$B!>(Bclass is
337     <code>-manakai-contains</code></dt>
338 wakaba 1.7 <dd>
339     <ol>
340     <li>Append a <code class=char>U+0028</code> <code class=charname>LEFT
341     PARENTHESIS</code> (<code class=char>(</code>) character
342     to <var>result</var>.</li>
343     <li>Append <span class=ed>@@ normalized</span>
344     string (the argument) to <var>result</var>.</li>
345     <li>Append a <code class=char>U+0029</code>
346     <code class=charname>RIGHT PARENTHESIS</code>
347     (<code class=char>)</code>) character
348     to <var>result</var>.</li>
349     </ol>
350     </dd>
351 wakaba 1.8 <dt>If name of the pseudo$B!>(Bclass is either <code>nth-child</code>,
352 wakaba 1.7 <code>nth-last-child</code>, <code>nth-of-type</code>, or
353     <code>nth-last-of-type</code></dt>
354     <dd>
355     <ol>
356     <li>Append a <code class=char>U+0028</code> <code class=charname>LEFT
357     PARENTHESIS</code> (<code class=char>(</code>) character
358     to <var>result</var>.</li>
359     <li>Append <span class=ed>@@ normalized</span>
360     integer <var>a</var> to <var>result</var>.
361     If the argument is a keyword <code>odd</code> or <code>even</code>,
362     <var>a</var> is <code>2</code>. If <var>a</var> and
363     <code>n</code> is omitted, <var>a</var> is assumed as
364     <code>0</code>. Otherwise, if <var>a</var> is omitted,
365     it is assumed as <code>1</code> (or <code>-1</code>,
366     if there is a <code class=char>U+002D</code>
367     <code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>)
368     character).</li>
369     <li>Append a <code class=char>U+006E</code>
370     <code class=charname>LATIN SMALL LETTER N</code>
371     (<code class=char>n</code>) character to <var>result</var>.</li>
372     <li>Append <span class=ed>@@ normalized</span>
373     integer <var>b</var> to <var>result</var>.
374     It <em class=rfc2119>MUST</em> be preceded by a sign,
375     either <code class=char>U+002B</code> <code class=charname>PLUS
376     SIGN</code> (<code class=char>+</code>) or
377     <code class=char>U+002D</code>
378     <code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>)
379     character. If the argument is a keyword <code>odd</code>,
380     <var>b</var> is <code>1</code>. If the argument
381     is a keyword <code>even</code>, <var>b</var> is
382     <code>0</code>. If <var>b</var> is omitted, it is assumed as
383     <code>0</code>. The sign of <code>0</code>
384     <em class=rfc2119>MUST</em> be <code class=char>U+002B</code>
385     <code class=charname>PLUS SIGN</code>
386     (<code class=char>+</code>).</li>
387     <li>Append a <code class=char>U+0029</code>
388     <code class=charname>RIGHT PARENTHESIS</code>
389     (<code class=char>)</code>) character
390     to <var>result</var>.</li>
391     </ol>
392     </dd>
393 wakaba 1.8 <dt>If the name of the pseudo$B!>(Bclass is <code>not</code></dt>
394     <dd>
395     <ol>
396     <li>Append a string of <code class=char>U+003A</code>
397     <code class=charname>COLON</code>, <code class=char>U+006E</code>
398     <code class=charname>LATIN SMALL LETTER N</code>,
399     <code class=char>U+006F</code> <code class=charname>LATIN
400     SMALL LETTER O</code>, <code class=char>U+0074</code>
401     <code class=charname>LATIN SMALL LETTER T</code>, and
402     <code class=char>U+0028</code> <code class=charname>LEFT
403     PARENTHESIS</code> (<code>:not(</code>), followed by a
404     <a href="#newline">newline</a>, to <var>result</var>.</li>
405     <li>Append four <code class=char>U+0020</code>
406     <code class=charname>SPACE</code> characters to
407     <var>result</var>.</li>
408     <li>Append four <code class=char>U+0020</code>
409     <code class=charname>SPACE</code> characters to
410     <var>result</var> again.</li>
411     <li><a href="#algorithm-serialize-a-simple-selector">Serialize
412     the simple selector specified as the argument to the
413     <code>not</code> pseudo$B!>(Bclass</a>.</li>
414     <li>Append a <a href="#newline">newline</a> to
415     <var>result</var>.</li>
416     <li>Append four <code class=char>U+0020</code>
417     <code class=charname>SPACE</code> characters to
418     <var>result</var>.</li>
419     <li>Append a <code class=char>U+0029</code>
420     <code class=charname>RIGHT PARENTHESIS</code>
421     (<code class=char>)</code>) character
422     to <var>result</var>.</li>
423     </ol>
424     </dd>
425 wakaba 1.7 </dl>
426     </li>
427     </ol>
428     </dd>
429     <dt>If <var>ss</var> is a pseudo$B!>(Belement</dt>
430     <dd>
431     <ol>
432     <li>Append two <code class=char>U+003A</code>
433     <code class=charname>COLON</code> characters (<code>::</code>)
434     to <var>result</var>.</li>
435 wakaba 1.8 <li>Append the <span class=ed>@@ normalized</span> name of the
436     pseudo$B!>(Belement to <var>result</var>.</li>
437 wakaba 1.7 <!-- For future version: append "(", arguments, ")", if any. -->
438     </ol>
439     </dd>
440 wakaba 1.6 </dl>
441 wakaba 1.1
442 wakaba 1.8
443     <p>A <dfn id=newline title=newline>newline</dfn>
444     <em class=rfc2119>SHOULD</em> be represented as a
445     <code class=char>U+000A</code> <code class=charname>LINE FEED</code>
446     character. However, depending on the context where
447     the <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
448     representation is in use, a sequence of
449     <code class=char>U+000D</code> <code class=charname>CARRIAGE RETURN</code>
450     followed by a <code class=char>U+000A</code>
451 wakaba 1.9 <code class=charname>LINE FEED</code> (i.e. a
452     <code>CRLF</code> sequence) or a character
453 wakaba 1.8 <code class=char>U+000D</code> <code class=charname>CARRIAGE RETURN</code>
454 wakaba 1.9 <em class=rfc2119>MAY</em> be used as a <a href="#newline">newline</a> instead.
455     <a href="#newline">Newline</a> representations
456     <em class=rfc2119>SHOULD</em> be consistent in an
457     <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
458     representation.</p>
459 wakaba 1.8
460     <div class="note memo">
461 wakaba 1.9 <p>Therefore, newlines must be normalized before
462 wakaba 1.8 <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
463 wakaba 1.9 representations are literally compared.</p>
464 wakaba 1.8 </div>
465    
466 wakaba 1.1 </div>
467    
468     <div class="section" id="parsing">
469     <h2>Parsing
470 wakaba 1.8 <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
471 wakaba 1.1 Groups of Selectors</h2>
472    
473     <p>Since <a href="#serializing">the serializing algorithm</a> is
474     so designed that it always output a valid
475     <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of
476 wakaba 1.8 selectors</a>, no special parser for the
477     <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
478     representation is necessary. Any conforming parser for
479     <a href="http://www.w3.org/TR/css3-selectors/#grouping">groups of
480     selectors</a> <em class=rfc2119>MAY</em> be used
481     to parse <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
482     representations of groups of selectors.</p>
483 wakaba 1.1 </div>
484    
485     <div class="section" id="examples">
486     <h2>Examples</h2>
487    
488 wakaba 1.7 <p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p>
489 wakaba 1.1
490     <div class="ed issue">
491     <p><a href="http://suika.fam.cx/gate/2007/css/parser-interface">Try demo</a>,
492 wakaba 1.7 by choosing <q>Selectors</q> radio button.</p>
493 wakaba 1.1
494     <div class="example figure block">
495     <div class="caption">...</div>
496    
497     <pre><code>...</code></pre>
498     </div>
499    
500     </div>
501    
502     </div>
503    
504     <div id="references" class="section reference">
505 wakaba 1.7 <h2>References</h2>
506 wakaba 1.1
507     <div id="normative-references" class="section normative reference">
508     <h3>Normative References</h3>
509    
510     <dl>
511     <dt id="ref-KEYWORDS">KEYWORDS</dt>
512 wakaba 1.4 <dd><cite><a href="urn:ietf:rfc:2119">Key words for use in
513     <abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>,
514     <abbr title="Internet Engineering Task Force">IETF</abbr>
515     <a href="urn:ietf:bcp:14"><abbr title="Best Current Practice">BCP</abbr>
516 wakaba 1.5 14</a>, <abbr title="Request for Comments">RFC</abbr> 2119,
517     <time datetime=1997-03>March 1997</time>.
518 wakaba 1.4 This version of the specification is referenced</dd>
519 wakaba 1.1 <dt id=ref-SELECTORS>SELECTORS</dt>
520 wakaba 1.2 <dd><a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215"><cite>Selectors</cite></a>,
521     <abbr title="World Wide Web Consortium">W3C</abbr> Working Draft,
522 wakaba 1.5 <time datetime=2005-12-15>15 December 2005</time>. Work in progress.
523 wakaba 1.2 <a href="http://www.w3.org/TR/css3-selectors">The latest version</a>
524     of the specification is referenced.</dd>
525 wakaba 1.1 </dl>
526     </div>
527    
528     <div id="informative-references" class="section informative reference">
529 wakaba 1.7 <h3>Non$B!>(Bnormative References</h3>
530 wakaba 1.1
531     <dl>
532 wakaba 1.5 <dt id=ref-CSS>CSS</dt>
533     <dd><cite><a href="http://www.w3.org/TR/2007/CR-CSS21-20070719">Cascading
534     Style Sheets Level 2 Revision 1 (<abbr>CSS</abbr> 2.1)
535     Specification</a></cite>,
536     <abbr title="World Wide Web Consortium">W3C</abbr> Candidate
537     Recommendation, <time datetime=2007-07-19>19 July 2007</time>.
538     Work in progress. The latest version of the specification is
539     available at
540     <code class=URI>&lt;<a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a>></code>.</dd>
541 wakaba 1.4 <dt id=ref-CSSOM>CSSOM</dt>
542     <dd><cite><a href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.55&amp;content-type=text/html;%20charset=utf-8">Cascading
543     Style Sheets Object Model (<abbr>CSSOM</abbr>)</a></cite>,
544     <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,
545 wakaba 1.5 <time datetime=2007-06-18>18 June 2007</time>. Work in progress.
546     The latest Editor's Draft of the specification is available at
547     <code class=URI>&lt;<a href="http://dev.w3.org/csswg/cssom/Overview.html">http://dev.w3.org/csswg/cssom/Overview.html</a>></code>.</dd>
548     <dt id=ref-HTML5>HTML5</dt>
549     <dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>,
550     <abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr>
551     Working Draft. Work in progress.</dd>
552     <dt id=ref-SAPI>SAPI</dt>
553     <dd><cite><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/selectors-api/Overview.html?rev=1.28&amp;content-type=text/html;%20charset=utf-8">Selectors <abbr>API</abbr></a></cite>,
554     <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,
555     <time datetime=2007-08-29>29 August 2007</time>. Work in progress.
556     The latest Editor's Draft of the specification is available at
557     <code class=URI>&lt;<a href="http://dev.w3.org/2006/webapi/selectors-api/Overview.html">http://dev.w3.org/2006/webapi/selectors-api/Overview.html</a>></code>.
558     The latest published version of the specification is available at
559     <code class=URI>&lt;<a href="http://www.w3.org/TR/selectors-api/">http://www.w3.org/TR/selectors-api/</a>></code>.</dd>
560 wakaba 1.10 <dt id=ref-XBL2>XBL2</dt>
561 wakaba 1.5 <dd><cite><a href="http://www.mozilla.org/projects/xbl/xbl2.html"><abbr>XBL</abbr>
562     2.0</a></cite>, Mozilla.org, <time datetime=2007-03-15>15 Mar 2007</time>.
563     Work in progress. The latest
564     <abbr title="World Wide Web Consortium">W3C</abbr>$B!>(Bpublished
565     version of the specification is available at
566     <code class=URI>&lt;<a href="http://www.w3.org/TR/xbl/">http://www.w3.org/TR/xbl/</a>></code>.</dd>
567 wakaba 1.1 </dl>
568     </div>
569    
570     </div>
571    
572     </body>
573     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24