/[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.3 - (show annotations) (download) (as text)
Tue Sep 25 13:28:00 2007 UTC (17 years, 2 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +61 -1 lines
File MIME type: text/html
group of selectors and selector algorithm filled

1 <!DOCTYPE html>
2 <html lang="en" class="formal-specification status-work-in-progress">
3 <head>
4 <title>Selectors Serialization Format for Testing (SSFT) Specification</title>
5 <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 <h1>Selectors Serialization Format for Testing (<abbr>SSFT</abbr>)
12 Specification</h1>
13 <h2>Working Draft 25 September 2007</h2>
14
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 </dl>
27 <dl class="authors" id="author">
28 <dt>Author</dt>
29 <dd><a href="http://suika.fam.cx/~wakaba/who?" rel="author"
30 lang=ja>Wakaba</a>
31 <code class="mail">&lt;<a href="mailto:w@suika.fam.cx" rel="author"
32 >w@suika.fam.cx</a>&gt;</code></dd>
33 </dl>
34
35 <p class="copyright" lang="en">&#xA9; 2007 <a
36 href="http://suika.fam.cx/~wakaba/who?" rel="author">Wakaba</a>.
37 Permission is granted to copy, distribute and/or modify this document
38 under the terms of the <a rel="license"
39 href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>,
40 Version 1.2
41 or any later version published by the <a
42 href="http://www.fsf.org/">Free Software Foundation</a>;
43 with no Invariant Sections, no Front$B!>(BCover Texts, and no Back$B!>(BCover
44 Texts. A copy of the license is
45 available at <code class="URI">&lt;<a
46 href="http://www.gnu.org/copyleft/fdl.html"
47 rel="license">http://www.gnu.org/copyleft/fdl.html</a>&gt;</code>.</p>
48 </div>
49
50 <div id="abstract" class="section">
51 <h2>Abstract</h2>
52
53 <div class="ed issue">...</div>
54
55 </div>
56
57 <div id="status" class="section">
58 <h2>Status of This Document</h2>
59
60 <p><em>This section describes the status of this document
61 at the time of its publication. Other documents
62 might supersede this document.</em></p>
63
64 <p>This document is a working draft.
65 It might be updated, replaced, or obsoleted by
66 other documents at any time. It is inappropriate to
67 cite this document as other than <q>work in progress</q>.</p>
68
69 <p>Comments on this document are welcome and
70 may be sent to the <a href="#author">author</a>.</p>
71
72 <p>Translations of thie document might be available.
73 The English version of the document is the only
74 normative version.</p>
75 </div>
76
77 <div id="introduction" class="section">
78 <h2>Introduction</h2>
79
80 <div class="issue ed">...</div>
81
82 </div>
83
84 <div class="section" id="terminology">
85 <h2>Terminology</h2>
86
87 <p>The key words <q><em class="rfc2119">MUST</em></q>,
88 <q><em class="rfc2119">MUST NOT</em></q>,
89 <q><em class="rfc2119">SHOULD</em></q>,
90 <q><em class="rfc2119">SHOULD NOT</em></q>, and
91 <q><em class=rfc2119>MAY</em></q> in this
92 document are to be interpreted as described in
93 <abbr title="Request for Comments">RFC</abbr> 2119
94 <cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p>
95 </div>
96
97 <div class="section" id="serializing">
98 <h2>Serializing Groups of Selectors</h2>
99
100 <div class="issue ed">
101 <p><a href="http://suika.fam.cx/gate/cvs/*checkout*/markup/html/whatpm/Whatpm/CSS/SelectorsSerializer.pm">See the reference implementation</a>
102 for now.</p>
103 </div>
104
105 <p><dfn id=newline>Newline</dfn> is <code class=char>U+000A</code>
106 <code class=charname>LINE FEED</code> <span class=ed>or
107 U+000D U+000A or U+000A ??</span>.</p>
108
109 <ol>
110 <li>Let <var>result</var> an empty string.</li>
111 <li>For each selector (<var>selector</var>) in the group of selectors:
112 <ol>
113 <li>If <var>selector</var> is <em>not</em> the first selector
114 in the group of selectors, then append a <code class=char>U+002C</code>
115 <code class=charname>COMMA</code> followed by a
116 <a href="#newline">newline</a> to <var>result</var>.</li>
117 <li>Append four <code class=char>U+0020</code>
118 <code class=charname>SPACE</code> characters to <var>result</var>.</li>
119 <li>Process each sequence of simple selectors or
120 combinator in <var>selector</var> by following algorithm:
121 <dl class=switch>
122 <dt>If it is a sequence of simle selector (<var>sss</var>)</dt>
123 <dd class=ed>@@</dd>
124 <dt>If it is a combinator (<var>c</var>)</dt>
125 <dd>
126 <ol>
127 <li>Append two <code class=char>U+0020</code>
128 <code class=charname>SPACE</code> characters to <var>result</var>.</li>
129 <li>
130 <dl class=switch>
131 <dt>If <var>c</var> is descendant combinator (white space)</dt>
132 <dd>Append a <code class=char>U+0020</code>
133 <code class=charname>SPACE</code> character to
134 <var>result</var>.</dd>
135 <dt>If <var>c</var> is child combinator
136 (<code class=char>></code>)</dt>
137 <dd>Append a <code class=char>U+003E</code>
138 <code class=charname>GREATER-THAN SIGN</code> character to
139 <var>result</var>.</dd>
140 <dt>If <var>c</var> is adjacent sibling combinator
141 (<code class=char>+</code>)</dt>
142 <dd>Append a <code class=char>U+0020</code>
143 <code class=charname>SPACE</code> character to
144 <var>result</var>.</dd>
145 <dt>If <var>c</var> is general sibling combinator
146 (<code class=char>~</code>)</dt>
147 <dd>Append a <code class=char>U+007E</code>
148 <code class=charname>TILDE</code> character to
149 <var>result</var>.</dd>
150 </dl>
151 </li>
152 <li>Append a <code class=char>U+0020</code>
153 <code class=charname>SPACE</code> character to
154 <var>result</var>.</li>
155 </ol>
156 </dd>
157 </dl>
158 </ol>
159 </li>
160 <li>Then, <var>result</var> is the
161 <abbr title="Selectors Serialization Format for Testing">SFFT</abbr>
162 representation of the group of selectors.</li>
163 </ol>
164
165 </div>
166
167 <div class="section" id="parsing">
168 <h2>Parsing
169 <abbr title="Selectors Serialization Format for Testing">SFFT</abbr>
170 Groups of Selectors</h2>
171
172 <p>Since <a href="#serializing">the serializing algorithm</a> is
173 so designed that it always output a valid
174 <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of
175 selectors</a>, no special parser for the <abbr>SFFT</abbr>
176 is necessary. Any conforming
177 <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of
178 selectors</a> parser <em class=rfc2119>MAY</em> be used
179 to parse <abbr title="Selectors Serialization Format for Testing">SFFT</abbr>
180 groups of selectors.</p>
181 </div>
182
183 <div class="section" id="examples">
184 <h2>Examples</h2>
185
186 <p>This section is <em>informative</em>.</p>
187
188 <div class="ed issue">
189 <p><a href="http://suika.fam.cx/gate/2007/css/parser-interface">Try demo</a>,
190 by choosing <q>Selectors</q> radio button.</a></p>
191
192 <div class="example figure block">
193 <div class="caption">...</div>
194
195 <pre><code>...</code></pre>
196 </div>
197
198 </div>
199
200 </div>
201
202 <div id="references" class="section reference">
203 <h2>References</h1>
204
205 <div id="normative-references" class="section normative reference">
206 <h3>Normative References</h3>
207
208 <dl>
209 <dt id="ref-KEYWORDS">KEYWORDS</dt>
210 <dd class="ed">RFC 2119. The exact version of the specification
211 is referenced.</dd>
212 <dt id=ref-SELECTORS>SELECTORS</dt>
213 <dd><a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215"><cite>Selectors</cite></a>,
214 <abbr title="World Wide Web Consortium">W3C</abbr> Working Draft,
215 15 December 2005. Work in progress.
216 <a href="http://www.w3.org/TR/css3-selectors">The latest version</a>
217 of the specification is referenced.</dd>
218 </dl>
219 </div>
220
221 <div id="informative-references" class="section informative reference">
222 <h3>Informative References</h3>
223
224 <dl>
225 <dt id=ref-CSSOM</dt>CSSOM</dt>
226 <dd class=ed>CSSOM specification, W3C ED, work in progress.</dd>
227 </dl>
228 </div>
229
230 </div>
231
232 </body>
233 </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24