128 |
2119</a> |
2119</a> |
129 |
<cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p> |
<cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p> |
130 |
|
|
131 |
|
<p>Requirements phrased in the imperative as part of algorithms are to be |
132 |
|
interpreted with the meaning of the key word (<em class=rfc2119>MUST</em>) |
133 |
|
used in introducing the algorithm.</p> |
134 |
|
|
135 |
|
<p>Conformance requirements phrased as algorithms or specific steps |
136 |
|
<em class=rfc2119>MAY</em> be implemented in any manner, so long as the end |
137 |
|
result is equivalent.</p> |
138 |
|
|
139 |
<!-- Strictly speaking the paragraph below is not part of terminology. --> |
<!-- Strictly speaking the paragraph below is not part of terminology. --> |
140 |
<p>All examples and notes in this specification are non$B!>(Bnormative, |
<p>All examples and notes in this specification are non$B!>(Bnormative, |
141 |
as are all sections explicitly marked non$B!>(Bnormative. Everything |
as are all sections explicitly marked non$B!>(Bnormative. Everything |
157 |
for now.</p> |
for now.</p> |
158 |
</div> |
</div> |
159 |
|
|
|
<div class=section id=serializing-groups-of-selectors> |
|
|
<h3>Serializing Groups of Selectors</h3> |
|
|
|
|
|
<p>No <abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
|
|
representation is defined for an invalid group of selectors.</p> |
|
|
|
|
160 |
<div class="note memo"> |
<div class="note memo"> |
161 |
<p>The serialized representation will not contain any comment.</p> |
<p>The serialized representation will not contain any comment.</p> |
162 |
</div> |
</div> |
|
|
|
163 |
<!-- TODO: link terms to Selectors --> |
<!-- TODO: link terms to Selectors --> |
164 |
|
|
165 |
<p>To |
<div class=section id=serializing-tokens> |
166 |
<dfn id=algorithm-serialize-a-group-of-selectors title="serialize a group of selectors">serialize |
<h3>Serializing Tokens</h3> |
167 |
a group of selectors (<dfn id=var-gs><var>gs</var></dfn>)</dfn>:</p> |
|
168 |
|
<p>To <dfn id=algorithm-normalize-an-ident title="normalize an IDENT">normalize |
169 |
|
an <code>IDENT</code> (<dfn id=var-n><var>n</var></dfn>)</dfn>, |
170 |
|
the following algorithm <em class=rfc2119>MUST</em> be used:</p> |
171 |
<ol> |
<ol> |
172 |
<li>Let <dfn id=var-result><var>result</var></dfn> an empty string.</li> |
<li>Replace the escape sequences (<code>\</code> and following |
173 |
<li>For each selector (<dfn id=var-selector><var>selector</var></dfn>) in |
characters) in <var>n</var> by characters represented by them |
174 |
<var>gs</var>: |
respectively.</li> |
175 |
<ol> |
<li>If there is any character that is <em>not</em> one of |
176 |
<li>If <var>selector</var> is <em>not</em> the first selector |
<code class=char>U+002D</code> <code class=charname>HYPHEN-MINUS</code> |
177 |
in the group of selectors, then append a <code class=char>U+002C</code> |
(<code class=char>-</code>), <code class=char>U+0030</code> |
178 |
<code class=charname>COMMA</code> (<code class=char>,</code>) followed by a |
<code class=charname>DIGIT ZERO</code> |
179 |
<a href="#newline">newline</a> to <var>result</var>.</li> |
(<code class=char>0</code>) to <code class=char>U+0039</code> |
180 |
<li>Append four <code class=char>U+0020</code> |
<code class=charname>DIGIT NINE</code> (<code class=char>9</code>), |
181 |
<code class=charname>SPACE</code> characters to <var>result</var>.</li> |
<code class=char>U+0041</code> <code class=charname>LATIN CAPITAL LETTER |
182 |
<li>Process each sequence of simple selectors or |
A</code> (<code class=char>A</code>) to <code class=char>U+005A</code> |
183 |
combinator in <var>selector</var> by following algorithm: |
<code class=charname>LATIN CAPITAL LETTER Z</code> (<code class=char>Z</code>), |
184 |
<dl class=switch> |
<code class=char>U+005F</code> <code class=charname>LOW LINE</code> |
185 |
<dt>If it is a sequence of simle selector |
(<code class=char>_</code>), <code class=char>U+0061</code> |
186 |
(<dfn id=var-sss><var>sss</var></dfn>)</dt> |
<code class=charname>LATIN SMALL LETTER A</code> |
187 |
<dd> |
(<code class=char>a</code>) to <code class=char>U+006A</code> |
188 |
<ol> |
<code class=charname>LATIN SMALL LETTER Z</code> (<code class=char>z</code>), |
189 |
<li class=ed><a href="#algorithm-serialize-a-simple-selector">Serialize |
<code class=char>U+0080</code> to <code class=char>U+D7FF</code>, or |
190 |
each simple selector</a> in <var>sss</var>.</li> |
<code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in |
191 |
<li class=ed>sort</li> |
<var>n</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where |
192 |
<li>Append a <a href="#newline">newline</a> to <var>result</var>.</li> |
<dfn id=var-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase zero$B!>(Bpadded |
193 |
</ol> |
hexadecimal representation of the character. If the character |
194 |
</dd> |
is outside the range of <code>[<code class=char>U+0000</code>, |
195 |
<dt>If it is a combinator (<dfn id=var-c><var>c</var></dfn>)</dt> |
<code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var> |
196 |
<dd> |
<em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</li> |
197 |
<ol> |
<li>If the first character in <var>n</var> is one of |
198 |
<li>Append two <code class=char>U+0020</code> |
<code class=char>U+0030</code> <code class=charname>DIGIT ZERO</code> |
199 |
<code class=charname>SPACE</code> characters to <var>result</var>.</li> |
(<code class=char>0</code>) to <code class=char>U+0039</code> |
200 |
<li> |
<code class=charname>DIGIT NINE</code> (<code class=char>9</code>), |
201 |
<dl class=switch> |
then prepend a string <code>\00003</code> at the beginning of |
202 |
<dt>If <var>c</var> is descendant combinator (white space)</dt> |
<var>n</var>.</li> |
203 |
<dd>Append a <code class=char>U+0020</code> |
<li>If the first character in <var>n</var> is <code class=char>U+002D</code> |
204 |
<code class=charname>SPACE</code> character to |
<code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>) and |
205 |
<var>result</var>.</dd> |
the second character, if any, is <em>not</em> one of |
206 |
<dt>If <var>c</var> is child combinator |
<code class=char>U+0041</code> <code class=charname>LATIN CAPITAL LETTER |
207 |
(<code class=char>></code>)</dt> |
A</code> (<code class=char>A</code>) to <code class=char>U+005A</code> |
208 |
<dd>Append a <code class=char>U+003E</code> |
<code class=charname>LATIN CAPITAL LETTER Z</code> (<code class=char>Z</code>), |
209 |
<code class=charname>GREATER-THAN SIGN</code> |
<code class=char>U+005F</code> <code class=charname>LOW LINE</code> |
210 |
(<code class=char>></code>) character to <var>result</var>.</dd> |
(<code class=char>_</code>), <code class=char>U+0061</code> |
211 |
<dt>If <var>c</var> is adjacent sibling combinator |
<code class=charname>LATIN SMALL LETTER A</code> |
212 |
(<code class=char>+</code>)</dt> |
(<code class=char>a</code>) to <code class=char>U+006A</code> |
213 |
<dd>Append a <code class=char>U+002B</code> |
<code class=charname>LATIN SMALL LETTER Z</code> (<code class=char>z</code>), |
214 |
<code class=charname>PLUS SIGN</code> (<code class=char>+</code>) |
<code>U+0080</code> to <code>U+D7FF</code>, or |
215 |
character to <var>result</var>.</dd> |
<code>U+E000</code> to <code>U+10FFFF</code>, or |
216 |
<dt>If <var>c</var> is general sibling combinator |
<var>n</var> is equal to <code class=char>U+002D</code> |
217 |
(<code class=char>~</code>)</dt> |
<code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>), then |
218 |
<dd>Append a <code class=char>U+007E</code> |
replace the <code class=char>U+002D</code> |
219 |
<code class=charname>TILDE</code> (<code class=char>~</code>) |
<code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>) |
220 |
character to <var>result</var>.</dd> |
character by string <code>\00002D</code>.</li> |
221 |
</dl> |
<li>Then, <var>n</var> is the result of the algorithm.</li> |
222 |
</li> |
</ol> |
223 |
<li>Append a <code class=char>U+0020</code> |
|
224 |
<code class=charname>SPACE</code> character to |
<p>To <dfn id=algorithm-normalize-a-string title="normalize a STRING">normalize |
225 |
<var>result</var>.</li> |
a <code>STRING</code> (<dfn id=var-s><var>s</var></dfn>)</dfn>, |
226 |
</ol> |
the following algorithm <em class=rfc2119>MUST</em> be used:</p> |
227 |
</dd> |
<ol> |
228 |
</dl> |
<li><p>Replace the escape sequences (<code>\</code> and following |
229 |
</ol> |
characters) in <var>s</var> by characters represented by them |
230 |
</li> |
(or an empty string if <code>\</code> is immediately followed by |
231 |
<li>Then, <var>result</var> is the |
newline character(s)) respectively.</p></li> |
232 |
<abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
<li><p>Remove the quotation characters in <var>s</var> |
233 |
representation of <var>gs</var>.</li> |
if <var>s</var> is a <code>STRING</code>.</p> |
234 |
|
|
235 |
|
<div class="note memo"> |
236 |
|
<p>The input <var>s</var> to this algorithm may be an |
237 |
|
<code>IDENT</code>.</p> |
238 |
|
</div></li> |
239 |
|
<li><p>If there is any character that is <em>not</em> one of |
240 |
|
<code class=char>U+0020</code> <code class=charname>SPACE</code>, |
241 |
|
<code class=char>U+0021</code> <code class=charname>EXCLAMATION MARK</code> |
242 |
|
(<code class=char>!</code>), <code class=char>U+0023</code> |
243 |
|
<code class=charname>NUMBER SIGN</code> (<code class=char>#</code>) to |
244 |
|
<code class=char>U+005B</code> <code class=charname>LEFT SQUARE |
245 |
|
BRACKET</code>, <code class=char>U+005D</code> <code class=charname>RIGHT |
246 |
|
SQUARE BRACKET</code> to <code class=char>U+D7FF</code>, or |
247 |
|
<code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in |
248 |
|
<var>s</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where |
249 |
|
<dfn id=var-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase zero$B!>(Bpadded |
250 |
|
hexadecimal representation of the character. If the character |
251 |
|
is outside the range of <code>[<code class=char>U+0000</code>, |
252 |
|
<code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var> |
253 |
|
<em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</p></li> |
254 |
|
<li><p>Insert a <code class=char>U+0022</code> <code class=charname>QUOTATION |
255 |
|
MARK</code> (<code class=char>"</code>) at the beginning of |
256 |
|
<var>s</var>.</p></li> |
257 |
|
<li><p>Insert a <code class=char>U+0022</code> <code class=charname>QUOTATION |
258 |
|
MARK</code> (<code class=char>"</code>) at the end of <var>s</var>.</p></li> |
259 |
|
<li><p>Then, <var>s</var> is the result of the algorithm.</p></li> |
260 |
</ol> |
</ol> |
261 |
|
|
262 |
|
<p>A <dfn id=newline title=newline>newline</dfn> |
263 |
|
<em class=rfc2119>SHOULD</em> be represented as a |
264 |
|
<code class=char>U+000A</code> <code class=charname>LINE FEED</code> |
265 |
|
character. However, depending on the context where |
266 |
|
the <abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
267 |
|
representation is in use, a sequence of |
268 |
|
<code class=char>U+000D</code> <code class=charname>CARRIAGE RETURN</code> |
269 |
|
followed by a <code class=char>U+000A</code> |
270 |
|
<code class=charname>LINE FEED</code> (i.e. a |
271 |
|
<code>CRLF</code> sequence) or a character |
272 |
|
<code class=char>U+000D</code> <code class=charname>CARRIAGE RETURN</code> |
273 |
|
<em class=rfc2119>MAY</em> be used as a <a href="#newline">newline</a> instead. |
274 |
|
<a href="#newline">Newline</a> representations |
275 |
|
<em class=rfc2119>SHOULD</em> be consistent in an |
276 |
|
<abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
277 |
|
representation.</p> |
278 |
|
|
279 |
|
<div class="note memo"> |
280 |
|
<p>Therefore, newlines must be normalized before |
281 |
|
<abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
282 |
|
representations are literally compared.</p> |
283 |
</div> |
</div> |
284 |
|
|
285 |
|
</div> |
286 |
|
|
287 |
|
|
288 |
<div class=section id=serializing-simple-selectors> |
<div class=section id=serializing-simple-selectors> |
289 |
<h3>Serializing Simple Selectors</h3> |
<h3>Serializing Simple Selectors</h3> |
290 |
|
|
291 |
|
<p>No <abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
292 |
|
representation is defined for an invalid simple selector selector.</p> |
293 |
|
|
294 |
<p>To |
<p>To |
295 |
<dfn id=algorithm-serialize-a-simple-selector title="serialize a simple selector">serialize |
<dfn id=algorithm-serialize-a-simple-selector title="serialize a simple selector">serialize |
296 |
a simple selector (<dfn><var id=var-ss>ss</var></dfn>)</dfn>:</p> |
a simple selector (<dfn><var id=var-ss>ss</var></dfn>)</dfn>, |
297 |
|
the following algorithm <em class=rfc2119>MUST</em> be used:</p> |
298 |
<dl class=switch> |
<dl class=switch> |
299 |
<dt>If <var>ss</var> is a type or universal selector</dt> |
<dt>If <var>ss</var> is a type or universal selector</dt> |
300 |
<dd> |
<dd> |
516 |
|
|
517 |
</div> |
</div> |
518 |
|
|
519 |
<div class=section id=serializing-tokens> |
<div class=section id=serializing-groups-of-selectors> |
520 |
<h3>Serializing Tokens</h3> |
<h3>Serializing Groups of Selectors</h3> |
521 |
|
|
522 |
<p>To <dfn id=algorithm-normalize-an-ident title="normalize an IDENT">normalize |
<p>No <abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
523 |
an <code>IDENT</code> (<dfn id=var-n><var>n</var></dfn>)</dfn>:</p> |
representation is defined for an invalid group of selectors.</p> |
|
<ol> |
|
|
<li>Replace the escape sequences (<code>\</code> and following |
|
|
characters) in <var>n</var> by characters represented by them |
|
|
respectively.</li> |
|
|
<li>If there is any character that is <em>not</em> one of |
|
|
<code class=char>U+002D</code> <code class=charname>HYPHEN-MINUS</code> |
|
|
(<code class=char>-</code>), <code class=char>U+0030</code> |
|
|
<code class=charname>DIGIT ZERO</code> |
|
|
(<code class=char>0</code>) to <code class=char>U+0039</code> |
|
|
<code class=charname>DIGIT NINE</code> (<code class=char>9</code>), |
|
|
<code class=char>U+0041</code> <code class=charname>LATIN CAPITAL LETTER |
|
|
A</code> (<code class=char>A</code>) to <code class=char>U+005A</code> |
|
|
<code class=charname>LATIN CAPITAL LETTER Z</code> (<code class=char>Z</code>), |
|
|
<code class=char>U+005F</code> <code class=charname>LOW LINE</code> |
|
|
(<code class=char>_</code>), <code class=char>U+0061</code> |
|
|
<code class=charname>LATIN SMALL LETTER A</code> |
|
|
(<code class=char>a</code>) to <code class=char>U+006A</code> |
|
|
<code class=charname>LATIN SMALL LETTER Z</code> (<code class=char>z</code>), |
|
|
<code class=char>U+0080</code> to <code class=char>U+D7FF</code>, or |
|
|
<code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in |
|
|
<var>n</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where |
|
|
<dfn id=var-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase zero$B!>(Bpadded |
|
|
hexadecimal representation of the character. If the character |
|
|
is outside the range of <code>[<code class=char>U+0000</code>, |
|
|
<code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var> |
|
|
<em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</li> |
|
|
<li>If the first character in <var>n</var> is one of |
|
|
<code class=char>U+0030</code> <code class=charname>DIGIT ZERO</code> |
|
|
(<code class=char>0</code>) to <code class=char>U+0039</code> |
|
|
<code class=charname>DIGIT NINE</code> (<code class=char>9</code>), |
|
|
then prepend a string <code>\00003</code> at the beginning of |
|
|
<var>n</var>.</li> |
|
|
<li>If the first character in <var>n</var> is <code class=char>U+002D</code> |
|
|
<code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>) and |
|
|
the second character, if any, is <em>not</em> one of |
|
|
<code class=char>U+0041</code> <code class=charname>LATIN CAPITAL LETTER |
|
|
A</code> (<code class=char>A</code>) to <code class=char>U+005A</code> |
|
|
<code class=charname>LATIN CAPITAL LETTER Z</code> (<code class=char>Z</code>), |
|
|
<code class=char>U+005F</code> <code class=charname>LOW LINE</code> |
|
|
(<code class=char>_</code>), <code class=char>U+0061</code> |
|
|
<code class=charname>LATIN SMALL LETTER A</code> |
|
|
(<code class=char>a</code>) to <code class=char>U+006A</code> |
|
|
<code class=charname>LATIN SMALL LETTER Z</code> (<code class=char>z</code>), |
|
|
<code>U+0080</code> to <code>U+D7FF</code>, or |
|
|
<code>U+E000</code> to <code>U+10FFFF</code>, or |
|
|
<var>n</var> is equal to <code class=char>U+002D</code> |
|
|
<code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>), then |
|
|
replace the <code class=char>U+002D</code> |
|
|
<code class=charname>HYPHEN-MINUS</code> (<code class=char>-</code>) |
|
|
character by string <code>\00002D</code>.</li> |
|
|
<li>Then, <var>n</var> is the result of the algorithm.</li> |
|
|
</ol> |
|
524 |
|
|
525 |
<p>To <dfn id=algorithm-normalize-a-string title="normalize a STRING">normalize |
<p>To |
526 |
a <code>STRING</code> (<dfn id=var-s><var>s</var></dfn>)</dfn>:</p> |
<dfn id=algorithm-serialize-a-group-of-selectors title="serialize a group of selectors">serialize |
527 |
|
a group of selectors (<dfn id=var-gs><var>gs</var></dfn>)</dfn>, |
528 |
|
the following algorithm <em class=rfc2119>MUST</em> be used:</p> |
529 |
<ol> |
<ol> |
530 |
<li><p>Replace the escape sequences (<code>\</code> and following |
<li>Let <dfn id=var-result><var>result</var></dfn> an empty string.</li> |
531 |
characters) in <var>s</var> by characters represented by them |
<li>For each selector (<dfn id=var-selector><var>selector</var></dfn>) in |
532 |
(or an empty string if <code>\</code> is immediately followed by |
<var>gs</var>: |
533 |
newline character(s)) respectively.</p></li> |
<ol> |
534 |
<li><p>Remove the quotation characters in <var>s</var> |
<li>If <var>selector</var> is <em>not</em> the first selector |
535 |
if <var>s</var> is a <code>STRING</code>.</p> |
in the group of selectors, then append a <code class=char>U+002C</code> |
536 |
|
<code class=charname>COMMA</code> (<code class=char>,</code>) followed by a |
537 |
<div class="note memo"> |
<a href="#newline">newline</a> to <var>result</var>.</li> |
538 |
<p>The input <var>s</var> to this algorithm may be an |
<li>Append four <code class=char>U+0020</code> |
539 |
<code>IDENT</code>.</p> |
<code class=charname>SPACE</code> characters to <var>result</var>.</li> |
540 |
</div></li> |
<li>Process each sequence of simple selectors or |
541 |
<li><p>If there is any character that is <em>not</em> one of |
combinator in <var>selector</var> by following algorithm: |
542 |
<code class=char>U+0020</code> <code class=charname>SPACE</code>, |
<dl class=switch> |
543 |
<code class=char>U+0021</code> <code class=charname>EXCLAMATION MARK</code> |
<dt>If it is a sequence of simle selector |
544 |
(<code class=char>!</code>), <code class=char>U+0023</code> |
(<dfn id=var-sss><var>sss</var></dfn>)</dt> |
545 |
<code class=charname>NUMBER SIGN</code> (<code class=char>#</code>) to |
<dd> |
546 |
<code class=char>U+005B</code> <code class=charname>LEFT SQUARE |
<ol> |
547 |
BRACKET</code>, <code class=char>U+005D</code> <code class=charname>RIGHT |
<li class=ed><a href="#algorithm-serialize-a-simple-selector">Serialize |
548 |
SQUARE BRACKET</code> to <code class=char>U+D7FF</code>, or |
each simple selector</a> in <var>sss</var>.</li> |
549 |
<code class=char>U+E000</code> to <code class=char>U+10FFFF</code> in |
<li class=ed>sort</li> |
550 |
<var>s</var>, then replace it by string <code>\<var>HHHHHH</var></code>, where |
<li>Append a <a href="#newline">newline</a> to <var>result</var>.</li> |
551 |
<dfn id=var-HHHHHH><var>HHHHHH</var></dfn> is the upper$B!>(Bcase zero$B!>(Bpadded |
</ol> |
552 |
hexadecimal representation of the character. If the character |
</dd> |
553 |
is outside the range of <code>[<code class=char>U+0000</code>, |
<dt>If it is a combinator (<dfn id=var-c><var>c</var></dfn>)</dt> |
554 |
<code class=char>U+10FFFF</code>]</code>, <var>HHHHHH</var> |
<dd> |
555 |
<em class=rfc2119>MUST</em> be <code>FFFFFF</code>.</p></li> |
<ol> |
556 |
<li><p>Insert a <code class=char>U+0022</code> <code class=charname>QUOTATION |
<li>Append two <code class=char>U+0020</code> |
557 |
MARK</code> (<code class=char>"</code>) at the beginning of |
<code class=charname>SPACE</code> characters to <var>result</var>.</li> |
558 |
<var>s</var>.</p></li> |
<li> |
559 |
<li><p>Insert a <code class=char>U+0022</code> <code class=charname>QUOTATION |
<dl class=switch> |
560 |
MARK</code> (<code class=char>"</code>) at the end of <var>s</var>.</p></li> |
<dt>If <var>c</var> is descendant combinator (white space)</dt> |
561 |
<li><p>Then, <var>s</var> is the result of the algorithm.</p></li> |
<dd>Append a <code class=char>U+0020</code> |
562 |
</ol> |
<code class=charname>SPACE</code> character to |
563 |
|
<var>result</var>.</dd> |
564 |
<p>A <dfn id=newline title=newline>newline</dfn> |
<dt>If <var>c</var> is child combinator |
565 |
<em class=rfc2119>SHOULD</em> be represented as a |
(<code class=char>></code>)</dt> |
566 |
<code class=char>U+000A</code> <code class=charname>LINE FEED</code> |
<dd>Append a <code class=char>U+003E</code> |
567 |
character. However, depending on the context where |
<code class=charname>GREATER-THAN SIGN</code> |
568 |
the <abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
(<code class=char>></code>) character to <var>result</var>.</dd> |
569 |
representation is in use, a sequence of |
<dt>If <var>c</var> is adjacent sibling combinator |
570 |
<code class=char>U+000D</code> <code class=charname>CARRIAGE RETURN</code> |
(<code class=char>+</code>)</dt> |
571 |
followed by a <code class=char>U+000A</code> |
<dd>Append a <code class=char>U+002B</code> |
572 |
<code class=charname>LINE FEED</code> (i.e. a |
<code class=charname>PLUS SIGN</code> (<code class=char>+</code>) |
573 |
<code>CRLF</code> sequence) or a character |
character to <var>result</var>.</dd> |
574 |
<code class=char>U+000D</code> <code class=charname>CARRIAGE RETURN</code> |
<dt>If <var>c</var> is general sibling combinator |
575 |
<em class=rfc2119>MAY</em> be used as a <a href="#newline">newline</a> instead. |
(<code class=char>~</code>)</dt> |
576 |
<a href="#newline">Newline</a> representations |
<dd>Append a <code class=char>U+007E</code> |
577 |
<em class=rfc2119>SHOULD</em> be consistent in an |
<code class=charname>TILDE</code> (<code class=char>~</code>) |
578 |
<abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
character to <var>result</var>.</dd> |
579 |
representation.</p> |
</dl> |
580 |
|
</li> |
581 |
<div class="note memo"> |
<li>Append a <code class=char>U+0020</code> |
582 |
<p>Therefore, newlines must be normalized before |
<code class=charname>SPACE</code> character to |
583 |
|
<var>result</var>.</li> |
584 |
|
</ol> |
585 |
|
</dd> |
586 |
|
</dl> |
587 |
|
</ol> |
588 |
|
</li> |
589 |
|
<li>Then, <var>result</var> is the |
590 |
<abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
<abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
591 |
representations are literally compared.</p> |
representation of <var>gs</var>.</li> |
592 |
</div> |
</ol> |
593 |
|
|
594 |
</div> |
</div> |
595 |
|
|