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"><<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft" |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft-20071105" |
19 |
>http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>></code></dd> |
>http://suika.fam.cx/www/markup/selectors/ssft/ssft-20071105</a>></code></dd> |
20 |
<dt>Latest Version</dt> |
<dt>Latest Version</dt> |
21 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft" |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft" |
22 |
>http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>></code></dd> |
>http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>></code></dd> |
|
<!-- |
|
23 |
<dt>Latest Working Draft</dt> |
<dt>Latest Working Draft</dt> |
24 |
--> |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft-work" |
25 |
|
>http://suika.fam.cx/www/markup/selectors/ssft/ssft-work</a>></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><<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>></code></dd> |
<dd><code class=URI><<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>></code></dd> |
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> |
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 |
|
|
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-ident-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase |
<dfn id=var-ident-HHHHHH><var>HHHHHH</var></dfn> is the uppercase |
207 |
zero$B!>(Bpadded 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> |
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-string-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase |
<dfn id=var-string-HHHHHH><var>HHHHHH</var></dfn> is the uppercase |
260 |
zero$B!>(Bpadded 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> |
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 |
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> |
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> |
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 |
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 |