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

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

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

revision 1.1 by wakaba, Sat Sep 22 12:42:44 2007 UTC revision 1.4 by wakaba, Tue Sep 25 13:57:09 2007 UTC
# Line 1  Line 1 
1  <!DOCTYPE html>  <!DOCTYPE html>
2  <html lang="en" class="formal-specification status-work-in-progress">  <html lang="en" class="formal-specification status-work-in-progress">
3  <head>  <head>
4  <title>Selectors Serialization Format for Testing (SSFT)</title>  <title>Selectors Serialization Format for Testing (SSFT) Specification</title>
5  <link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec">  <link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec">
6  <link rel="license" href="http://suika.fam.cx/c/gnu/fdl">  <link rel="license" href="http://suika.fam.cx/c/gnu/fdl">
7  </head>  </head>
8  <body class="has-abstract">  <body class="has-abstract">
9    
10  <div class="header">  <div class="header">
11  <h1>Selectors Serialization Format for Testing (<abbr>SSFT</abbr>)</h1>  <h1>Selectors Serialization Format for Testing (<abbr>SSFT</abbr>)
12  <h2>Working Draft 22 September 2007</h2>  Specification</h1>
13    <h2>Working Draft 25 September 2007</h2>
14    
15  <dl class="versions-uri">  <dl class="versions-uri">
16  <dt>This Version</dt>  <dt>This Version</dt>
# Line 76  normative version.</p> Line 77  normative version.</p>
77  <div id="introduction" class="section">  <div id="introduction" class="section">
78  <h2>Introduction</h2>  <h2>Introduction</h2>
79    
80    <p>This section is <em>informative</em>.</p>
81    
82  <div class="issue ed">...</div>  <div class="issue ed">...</div>
83    
84    <p><a href="http://dev.w3.org/cvsweb/csswg/cssom/Overview.html">The
85    <abbr title="Cascading Style Sheets Object Model">CSSOM</abbr>
86    specification</a>
87    <cite class="bibref informative">[<a href="#bib-CSSOM">CSSOM</a>]</cite>
88    is trying to define an algorithm to
89    <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
90    a group of selectors</a> for the purpose of <code>selectorText</code>
91    attribute.  However, the algorithm is incomplete
92    at the time of the writing.  Note that current Web browser implementations
93    of the <code>selectorText</code> attribute are consistently broken
94    in not escaping unsafe identifiers.</p>
95    
96  </div>  </div>
97    
98  <div class="section" id="terminology">  <div class="section" id="terminology">
# Line 101  document are to be interpreted as descri Line 116  document are to be interpreted as descri
116  for now.</p>  for now.</p>
117  </div>  </div>
118    
119    <p><dfn id=newline>Newline</dfn> is <code class=char>U+000A</code>
120    <code class=charname>LINE FEED</code> <span class=ed>or
121    U+000D U+000A or U+000A ??</span>.</p>
122    
123    <!-- TODO: link terms to Selectors -->
124    
125    <ol>
126    <li>Let <var>result</var> an empty string.</li>
127    <li>For each selector (<var>selector</var>) in the group of selectors:
128      <ol>
129      <li>If <var>selector</var> is <em>not</em> the first selector
130      in the group of selectors, then append a <code class=char>U+002C</code>
131      <code class=charname>COMMA</code> followed by a
132      <a href="#newline">newline</a> to <var>result</var>.</li>
133      <li>Append four <code class=char>U+0020</code>
134      <code class=charname>SPACE</code> characters to <var>result</var>.</li>
135      <li>Process each sequence of simple selectors or
136      combinator in <var>selector</var> by following algorithm:
137        <dl class=switch>
138        <dt>If it is a sequence of simle selector (<var>sss</var>)</dt>
139          <dd class=ed>@@</dd>
140        <dt>If it is a combinator (<var>c</var>)</dt>
141          <dd>
142            <ol>
143            <li>Append two <code class=char>U+0020</code>
144            <code class=charname>SPACE</code> characters to <var>result</var>.</li>
145            <li>
146              <dl class=switch>
147              <dt>If <var>c</var> is descendant combinator (white space)</dt>
148                <dd>Append a <code class=char>U+0020</code>
149                <code class=charname>SPACE</code> character to
150                <var>result</var>.</dd>
151              <dt>If <var>c</var> is child combinator
152              (<code class=char>></code>)</dt>
153                <dd>Append a <code class=char>U+003E</code>
154                <code class=charname>GREATER-THAN SIGN</code> character to
155                <var>result</var>.</dd>
156              <dt>If <var>c</var> is adjacent sibling combinator
157              (<code class=char>+</code>)</dt>
158                <dd>Append a <code class=char>U+0020</code>
159                <code class=charname>SPACE</code> character to
160                <var>result</var>.</dd>
161              <dt>If <var>c</var> is general sibling combinator
162              (<code class=char>~</code>)</dt>
163                <dd>Append a <code class=char>U+007E</code>
164                <code class=charname>TILDE</code> character to
165                <var>result</var>.</dd>
166              </dl>
167            </li>
168            <li>Append a <code class=char>U+0020</code>
169            <code class=charname>SPACE</code> character to
170            <var>result</var>.</li>
171            </ol>
172          </dd>
173        </dl>
174      </ol>
175    </li>
176    <li>Then, <var>result</var> is the
177    <abbr title="Selectors Serialization Format for Testing">SFFT</abbr>
178    representation of the group of selectors.</li>
179    </ol>
180    
181  </div>  </div>
182    
183  <div class="section" id="parsing">  <div class="section" id="parsing">
# Line 111  Groups of Selectors</h2> Line 188  Groups of Selectors</h2>
188  <p>Since <a href="#serializing">the serializing algorithm</a> is  <p>Since <a href="#serializing">the serializing algorithm</a> is
189  so designed that it always output a valid  so designed that it always output a valid
190  <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of  <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of
191  selectors</a>, no special parser for the <abbr>SFFT</abbr>  selectors</a>, no special parser for
192    <abbr title="Selectors Serialization Format for Testing">SFFT</abbr>
193  is necessary.  Any conforming  is necessary.  Any conforming
194  <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of  <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of
195  selectors</a> parser <em class=rfc2119>MAY</em> be used  selectors</a> parser <em class=rfc2119>MAY</em> be used
# Line 146  by choosing <q>Selectors</q> radio butto Line 224  by choosing <q>Selectors</q> radio butto
224    
225  <dl>  <dl>
226  <dt id="ref-KEYWORDS">KEYWORDS</dt>  <dt id="ref-KEYWORDS">KEYWORDS</dt>
227    <dd class="ed">RFC 2119.  The exact version of the specification    <dd><cite><a href="urn:ietf:rfc:2119">Key words for use in
228    is referenced.</dd>    <abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>,
229      <abbr title="Internet Engineering Task Force">IETF</abbr>
230      <a href="urn:ietf:bcp:14"><abbr title="Best Current Practice">BCP</abbr>
231      14</a>, <abbr title="Request for Comments">RFC</abbr> 2119, March 1997.
232      This version of the specification is referenced</dd>
233  <dt id=ref-SELECTORS>SELECTORS</dt>  <dt id=ref-SELECTORS>SELECTORS</dt>
234    <dd class=ed><cite>Selectors</cite>, W3C WD, work in progress.</dd>    <dd><a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215"><cite>Selectors</cite></a>,
235      <abbr title="World Wide Web Consortium">W3C</abbr> Working Draft,
236      15 December 2005.  Work in progress.  
237      <a href="http://www.w3.org/TR/css3-selectors">The latest version</a>
238      of the specification is referenced.</dd>
239  </dl>  </dl>
240  </div>  </div>
241    
# Line 157  by choosing <q>Selectors</q> radio butto Line 243  by choosing <q>Selectors</q> radio butto
243  <h3>Informative References</h3>  <h3>Informative References</h3>
244    
245  <dl>  <dl>
246  <dt id=ref-CSSOM</dt>CSSOM</dt>  <dt id=ref-CSSOM>CSSOM</dt>
247    <dd class=ed>CSSOM specification, W3C ED, work in progress.</dd>    <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
248      Style Sheets Object Model (<abbr>CSSOM</abbr>)</a></cite>,
249      <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,
250      18 June 2007.  Work in progress.  The latest Editor's Draft
251      of the specification is available at
252      <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>
253  </dl>  </dl>
254  </div>  </div>
255    

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24