/[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.19 by wakaba, Mon Nov 5 10:59:48 2007 UTC revision 1.27 by wakaba, Mon Nov 5 11:39:39 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"><!-- work-in-progress -->
3  <head>  <head>
4  <title>Selectors Serialization Format for Testing (SSFT) Specification</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">
# Line 10  Line 10 
10  <div class="header">  <div class="header">
11  <h1>Selectors Serialization Format for Testing (<abbr>SSFT</abbr>)  <h1>Selectors Serialization Format for Testing (<abbr>SSFT</abbr>)
12  Specification</h1>  Specification</h1>
13  <h2>Working Draft <time datetime=2007-11-05>5 November 2007</time></h2>  <h2>First Edition <!-- Working Draft -->
14    <time datetime=2007-11-05>5 November 2007</time></h2>
15    
16  <dl class="versions-uri">  <dl class="versions-uri">
17  <dt>This Version</dt>  <dt>This Version</dt>
18    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft-20071105"
19        >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>        >http://suika.fam.cx/www/markup/selectors/ssft/ssft-20071105</a>&gt;</code></dd>
20  <dt>Latest Version</dt>  <dt>Latest Version</dt>
21    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"
22        >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>        >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>
 <!--  
23  <dt>Latest Working Draft</dt>  <dt>Latest Working Draft</dt>
24  -->    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft-work"
25          >http://suika.fam.cx/www/markup/selectors/ssft/ssft-work</a>&gt;</code></dd>
26  <!-- <dt>Previous Version</dt> -->  <!-- <dt>Previous Version</dt> -->
27  <dt>Version History</dt>  <dt>Version History</dt>
28    <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>    <dd><code class=URI>&lt;<a href="http://suika.fam.cx/gate/cvs/markup/selectors/ssft/ssft-work.en.html">http://suika.fam.cx/gate/cvs/markup/selectors/ssft/ssft-work.en.html</a>&gt;</code></dd>
29  </dl>  </dl>
30  <dl class="authors" id="author">  <dl class="authors" id="author">
31  <dt>Author</dt>  <dt>Author</dt>
# Line 52  available at <code class="URI">&lt;<a Line 53  available at <code class="URI">&lt;<a
53  <div id="abstract" class="section">  <div id="abstract" class="section">
54  <h2>Abstract</h2>  <h2>Abstract</h2>
55    
56  <div class="ed issue">...</div>  <p>This document defines
57    <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>,
58    a subset of Selectors language which is suitable for describing results
59    of Selectors parsing tests.</p>
60    
61  </div>  </div>
62    
# Line 63  available at <code class="URI">&lt;<a Line 67  available at <code class="URI">&lt;<a
67  at the time of its publication.  Other documents  at the time of its publication.  Other documents
68  might supersede this document.</em></p>  might supersede this document.</em></p>
69    
70  <p>This document is a working draft, produced as part of the  <p>This document is the specification
71    <!-- This document is a working draft -->
72    of <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>,
73    produced as part of the
74  <a href="http://suika.fam.cx/www/markup/html/whatpm/readme">Whatpm</a>  <a href="http://suika.fam.cx/www/markup/html/whatpm/readme">Whatpm</a>
75  subproject  subproject
76  of the <a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a>  of the <a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a>
77  project.  It might be updated, replaced, or obsoleted by  project.
78    <!-- It might be updated, replaced, or obsoleted by
79  other documents at any time.  It is inappropriate to  other documents at any time.  It is inappropriate to
80  cite this document as other than <q>work in progress</q>.</p>  cite this document as other than <q>work in progress</q>. --></p>
81    
82  <p>Comments on this document are welcome and  <p>Comments on this document are welcome and
83  may be sent to the <a href="#author">author</a>.</p>  may be sent to the <a href="#author">author</a>.</p>
# Line 125  to deploy that format for testing.</p> Line 133  to deploy that format for testing.</p>
133    
134  <p>The key words <q><dfn id=must><em class="rfc2119">MUST</em></dfn></q>,  <p>The key words <q><dfn id=must><em class="rfc2119">MUST</em></dfn></q>,
135  <q><dfn id=must-not><em class="rfc2119">MUST NOT</em></dfn></q>,  <q><dfn id=must-not><em class="rfc2119">MUST NOT</em></dfn></q>,
136  <q><dfn id=should><em class="rfc2119">SHOULD</em></dfn></q>,  <q><dfn id=should><em class="rfc2119">SHOULD</em></dfn></q>, and
 <q><dfn id=should-not><em class="rfc2119">SHOULD NOT</em></dfn></q>, and  
137  <q><dfn id=may><em class=rfc2119>MAY</em></dfn></q> in this  <q><dfn id=may><em class=rfc2119>MAY</em></dfn></q> in this
138  document are to be interpreted as described in  document are to be interpreted as described in
139  <a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr>  <a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr>
# Line 166  a group of selectors</a>.</p> Line 173  a group of selectors</a>.</p>
173  <p>The serialized representation will not contain any comment.</p>  <p>The serialized representation will not contain any comment.</p>
174  </div>  </div>
175    
 <div class="ed issue"><p>TODO: link terms to Selectors</p></div>  
   
176  <div class=section id=serializing-tokens>  <div class=section id=serializing-tokens>
177  <h3>Serializing Tokens</h3>  <h3>Serializing Tokens</h3>
178    
# Line 198  A</code> (<code class=char>A</code>) to Line 203  A</code> (<code class=char>A</code>) to
203  <code class=char>U+0080</code> to <code class=char>U+D7FF</code>, or  <code class=char>U+0080</code> to <code class=char>U+D7FF</code>, or
204  <code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in  <code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in
205  <var>n</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where  <var>n</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where
206  <dfn id=var-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase zero$B!>(Bpadded  <dfn id=var-ident-HHHHHH><var>HHHHHH</var></dfn> is the uppercase
207  hexadecimal representation of the character.  If the character  zero$B!>(Bpadded hexadecimal representation of the character.  If the character
208  is outside the range of <code>[<code class=char>U+0000</code>,  is outside the range of <code>[<code class=char>U+0000</code>,
209  <code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var>  <code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var>
210  <em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</li>  <em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</li>
# Line 251  BRACKET</code>, <code class=char>U+005D< Line 256  BRACKET</code>, <code class=char>U+005D<
256  SQUARE BRACKET</code> to <code class=char>U+D7FF</code>, or  SQUARE BRACKET</code> to <code class=char>U+D7FF</code>, or
257  <code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in  <code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in
258  <var>s</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where  <var>s</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where
259  <dfn id=var-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase zero$B!>(Bpadded  <dfn id=var-string-HHHHHH><var>HHHHHH</var></dfn> is the uppercase
260  hexadecimal representation of the character.  If the character  zero$B!>(Bpadded hexadecimal representation of the character.  If the character
261  is outside the range of <code>[<code class=char>U+0000</code>,  is outside the range of <code>[<code class=char>U+0000</code>,
262  <code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var>  <code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var>
263  <em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</p></li>  <em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</p></li>
# Line 288  representations are literally compared.< Line 293  representations are literally compared.<
293  </div>  </div>
294    
295  <div class="issue ed">  <div class="issue ed">
296  <p>Need to define <dfn id=lower-case>lower$B!>(Bcase</dfn>.  <p>In a future version of the specification, we need to define
297  It is tr/A-Z/a-z/ for now.</p>  <dfn id=lowercase>lowercase</dfn> (maybe by referencing some version of
298    some module of <abbr>CSS</abbr>).  It is <code>tr/A-Z/a-z/</code> for now.</p>
299  </div>  </div>
300    
301  <p>To  <p>To
302  <dfn id=algorithm-normalize-an-integer title="normalize an integer">normalize  <dfn id=algorithm-normalize-an-integer title="normalize an integer">normalize
303  an integer (<dfn id=var-int-i><var>i</var></dfn>)</dfn>, the following  an integer (<dfn id=var-int-i><var>i</var></dfn>)</dfn>, the following
304  algorithm <em class=rfc2119>MUST</em> be run:</p>  algorithm <em class=rfc2119>MUST</em> be used:</p>
305  <ol class=algorithm>  <ol class=algorithm>
306  <li>If <var>i</var> is equal to zero (0), return a string with only a  <li>If <var>i</var> is equal to zero (0), return a string with only a
307  character: <code class=char>U+0030</code>  character: <code class=char>U+0030</code>
# Line 433  the following algorithm <em class=rfc211 Line 439  the following algorithm <em class=rfc211
439      to <var>r</var>.</li>      to <var>r</var>.</li>
440      <li>Append the      <li>Append the
441      <a href="#algorithm-normalize-an-ident" title="normalize a string (IDENT) as an IDENT">normalized</a>      <a href="#algorithm-normalize-an-ident" title="normalize a string (IDENT) as an IDENT">normalized</a>
442      name (in <a href="#lower-case">lower$B!>(Bcase</a>) of the pseudo$B!>(Bclass to      name (in <a href="#lowercase">lowercase</a>) of the pseudo$B!>(Bclass to
443      <var>r</var>.</li>      <var>r</var>.</li>
444      <li>Append any arguments as following:      <li>Append any arguments as following:
445        <dl class=switch>        <dl class=switch>
# Line 489  the following algorithm <em class=rfc211 Line 495  the following algorithm <em class=rfc211
495            <li>Let <var>a</var> be the            <li>Let <var>a</var> be the
496            <a href="#algorithm-normalize-an-integer" title="normalize an integer">normalized            <a href="#algorithm-normalize-an-integer" title="normalize an integer">normalized
497            string representation</a> of integer <var>a</var>.</li>            string representation</a> of integer <var>a</var>.</li>
498            <li>Append <var>a</var> to <var>result</var>.</li>            <li>Append <var>a</var> to <var>r</var>.</li>
499            <li>Append a <code class=char>U+006E</code>            <li>Append a <code class=char>U+006E</code>
500            <code class=charname>LATIN SMALL LETTER N</code>            <code class=charname>LATIN SMALL LETTER N</code>
501            (<code class=char>n</code>) character to <var>r</var>.</li>            (<code class=char>n</code>) character to <var>r</var>.</li>
# Line 507  the following algorithm <em class=rfc211 Line 513  the following algorithm <em class=rfc211
513            <code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>)            <code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>)
514            character, then append <code class=char>U+002B</code>            character, then append <code class=char>U+002B</code>
515            <code class=charname>PLUS SIGN</code>            <code class=charname>PLUS SIGN</code>
516            (<code class=char>+</code>) to <var>result</var>.</li>            (<code class=char>+</code>) to <var>r</var>.</li>
517            <li>Append <var>b</var> to <var>result</var>.</li>            <li>Append <var>b</var> to <var>r</var>.</li>
518            <li>Append a <code class=char>U+0029</code>            <li>Append a <code class=char>U+0029</code>
519            <code class=charname>RIGHT PARENTHESIS</code>            <code class=charname>RIGHT PARENTHESIS</code>
520            (<code class=char>)</code>) character            (<code class=char>)</code>) character
# Line 565  the following algorithm <em class=rfc211 Line 571  the following algorithm <em class=rfc211
571      to <var>r</var>.</li>      to <var>r</var>.</li>
572      <li>Append the      <li>Append the
573      <a href="#algorithm-normalize-an-ident" title="normalize a string (IDENT) as an IDENT">normalized</a>      <a href="#algorithm-normalize-an-ident" title="normalize a string (IDENT) as an IDENT">normalized</a>
574      name (in <a href="#lower-case">lower$B!>(Bcase</a>) of the pseudo$B!>(Belement      name (in <a href="#lowercase">lowercase</a>) of the pseudo$B!>(Belement
575      to <var>r</var>.</li>      to <var>r</var>.</li>
576      <li>If the pseudo$B!>(Belement has any arguments:      <li>If the pseudo$B!>(Belement has any arguments:
577          The pseudo$B!>(Belement is not supported by this version of          The pseudo$B!>(Belement is not supported by this version of
# Line 720  representations of <a href="#simple-sele Line 726  representations of <a href="#simple-sele
726    
727  <p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p>  <p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p>
728    
 <div class="ed issue">  
 <p><a href="http://suika.fam.cx/gate/2007/css/parser-interface">Try demo</a>,  
 by choosing <q>Selectors</q> radio button.</p>  
   
729  <div class="example figure block">  <div class="example figure block">
730  <div class="caption">...</div>  <p>The <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
731    representation of a selector <code>p + q</code> is:</p>
732    
733  <pre><code>...</code></pre>  <pre><code>    *|p
734      + *|q
735    </code></pre>
736  </div>  </div>
737    
738    <div class="example figure block">
739    <p>The <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
740    representation of a selector <code>a#id.class1:n\ot(:Active)/*
741     comment
742    */.class2</code> is:</p>
743    
744    <pre><code>    *|a.class1.class2#id:not(
745            :active
746        )
747    </code></pre>
748    </div>
749    
750    <div class="example figure block">
751    <p>The <abbr title="Selectors Serialization Format for Testing">SSFT</abbr>
752    representation of a
753    <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of selectors</a>
754    <code>a, #b, C[d^=e], .\31 23</code> is:</p>
755    
756    <pre><code>    *|a
757    ,
758        *|*#b
759    ,
760        *|C[|d^="e"]
761    ,
762        *|*.\00003123
763    </code></pre>
764  </div>  </div>
765    
766  </div>  </div>
# Line 781  by choosing <q>Selectors</q> radio butto Line 812  by choosing <q>Selectors</q> radio butto
812  <dt id=ref-HTML5>HTML5</dt>  <dt id=ref-HTML5>HTML5</dt>
813    <dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>,    <dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>,
814    <abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr>    <abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr>
815    Working Draft.  Work in progress.</dd>    Working Draft, <time datetime="2007-11-03">3 November 2007</time>.
816      Work in progress.</dd>
817  <dt id=ref-SAPI>SAPI</dt>  <dt id=ref-SAPI>SAPI</dt>
818    <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>,    <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>,
819    <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,    <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.27

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24