Skip to content

Commit aa85bc1

Browse files
committed
[css2] Define the term skip (used instead of ignore), example fixes
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40607
1 parent 9d11d9f commit aa85bc1

1 file changed

Lines changed: 55 additions & 36 deletions

File tree

css2/syndata.src

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: syndata.src,v 1.42 1997-12-12 18:03:18 ijacobs Exp $ -->
3+
<!-- $Id: syndata.src,v 1.43 1998-01-08 20:19:18 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>CSS2 syntax and basic data types</TITLE>
@@ -32,7 +32,7 @@ also exercising the possibilities of the latest levels of CSS.
3232
<P>CSS style sheets consist of a sequence of tokens. The list of
3333
tokens for CSS2 is as follows. The definitions use Lex-style regular
3434
expressions. Octal codes refer to <a rel="biblioentry"
35-
href="./refs.html#ref-ISO10646">[ISO10646]</a> Like in Lex, in case of
35+
href="./refs.html#ref-ISO10646">[ISO10646]</a> As in Lex, in case of
3636
multiple matches, the longest match determines the token.
3737

3838
<TABLE>
@@ -103,6 +103,15 @@ doesn't matter, but their presence or absence may change the
103103
interpretation of some part of the style sheet. For example, in CSS2,
104104
WHITESPACE is significant in selectors.
105105

106+
<P>In some cases, user agents must "skip" part of an illegal style
107+
sheet. This specification defines <span class="index-def"
108+
title="skip"><a name="skip"><dfn>skip</dfn></a></span> to mean that
109+
the user agent parses the illegal string (from beginning to end), but
110+
then <span class="index-inst" title="skip"><a
111+
href="#skip">skips</a></span> the string.
112+
113+
<!-- How are "beginning" and "end" defined? -IJ -->
114+
106115
<H3>Characters and case</H3>
107116
<P> The following rules always hold:
108117

@@ -173,12 +182,14 @@ characters.</a>
173182

174183
<P> An at-rule consists of everything up to and including the next
175184
semicolon (;) or the next <a href="#block">block,</a> whichever comes
176-
first. A CSS UA that encounters an unrecognized at-rule must ignore
185+
first. A CSS UA that encounters an unrecognized at-rule must
186+
<span class="index-inst" title="skip"><a href="#skip">skip</a></span>
177187
the whole of the @-rule and continue parsing after it.
178188

179189
<P> CSS2 User agents have some additional constraints, e.g., they must
180-
also ignore any '@import' rule that occurs inside a <a
181-
href="#block">block</a> or that doesn't preceded all rule sets.
190+
also <span class="index-inst" title="skip"><a
191+
href="#skip">skip</a></span> any '@import' rule that occurs inside a
192+
<a href="#block">block</a> or that doesn't preceded all rule sets.
182193

183194
<div class="illegal-example"><P>
184195
Here is an example. Assume a CSS2 parser encounters this style sheet:
@@ -190,15 +201,16 @@ Here is an example. Assume a CSS2 parser encounters this style sheet:
190201
</PRE>
191202

192203
<P> The second '@import' is illegal according to CSS2. The CSS2 parser
193-
skips the whole at-rule, effectively reducing the style sheet to:
204+
<span class="index-inst" title="skip"><a href="#skip">skips</a></span>
205+
the whole at-rule, effectively reducing the style sheet to:
194206

195207
<PRE>
196208
@import "subs.css";
197209
H1 { color: blue }
198210
</PRE>
199211
</div>
200212

201-
<div class="example"><P>
213+
<div class="illegal-example"><P>
202214
In the following example, the second '@import' rule is invalid,
203215
since it occurs inside a '@media' <a href="#block">block</a>.
204216

@@ -256,22 +268,23 @@ title="selector"><em>selector</em></span> (see also the section on <a
256268
href="selector.html">selectors</a>) consists of everything up to (but
257269
not including) the first left curly brace ({). A selector always goes
258270
together with a {}-block. When a UA can't parse the selector (i.e., it
259-
is not valid CSS2), it should skip (i.e., ignore) the {}-block as
260-
well.
261-
262-
<div class="note"><P>
263-
<em><strong>Note.</strong>
264-
CSS2 gives a special meaning to the comma (,) in
265-
selectors. However, since it is not known if the comma may acquire
266-
other meanings in future versions of CSS, the whole statement should
267-
be ignored if there is an error anywhere in the selector, even though
268-
the rest of the selector may look reasonable in CSS2.</em>
271+
is not valid CSS2), it should <span class="index-inst" title="skip"><a
272+
href="#skip">skip</a></span> the {}-block as well.
273+
274+
<div class="note"><P> <em><strong>Note.</strong> CSS2 gives a special
275+
meaning to the comma (,) in selectors. However, since it is not known
276+
if the comma may acquire other meanings in future versions of CSS, the
277+
whole statement should be <span class="index-inst" title="skip"><a
278+
href="#skip">skipped</a></span> if there is an error anywhere in the
279+
selector, even though the rest of the selector may look reasonable in
280+
CSS2.</em>
269281
</div>
270282

271283
<DIV class=illegal-example>
272284
<P>For example, since the "&amp;" is not a legal token in a CSS2
273-
selector, a CSS2 UA must ignore the whole second line, and not set the
274-
color of H3 to red:
285+
selector, a CSS2 UA must
286+
<span class="index-inst" title="skip"><a href="#skip">skip</a></span>
287+
the whole second line, and not set the color of H3 to red:
275288
<PRE>
276289
H1, H2 {color: green }
277290
H3, H4 &amp; H5 {color: red }
@@ -339,12 +352,13 @@ must come in matching pairs. Parentheses, brackets, and braces may be
339352
nested. Inside the quotes, characters are parsed as a string.
340353

341354
<P> To ensure that new properties and new values for existing
342-
properties can be added in the future, a UA must skip a declaration
343-
with an invalid property name or an invalid value. Every CSS2 property
344-
has its own syntactic and semantic restrictions on the values it
345-
accepts.
355+
properties can be added in the future, a UA must <span
356+
class="index-inst" title="skip"><a href="#skip">skip</a></span> a
357+
declaration with an invalid property name or an invalid value. Every
358+
CSS2 property has its own syntactic and semantic restrictions on the
359+
values it accepts.
346360

347-
<div class="example"><P>
361+
<div class="illegal-example"><P>
348362
For example, assume a CSS2 parser encounters this style sheet:
349363

350364
<PRE>
@@ -356,10 +370,11 @@ For example, assume a CSS2 parser encounters this style sheet:
356370

357371
<P> The second declaration on the first line has an invalid value
358372
'12pt'. The second declaration on the second line contains an
359-
undefined property 'font-vendor'. The CSS2 parser will skip these
373+
undefined property 'font-vendor'. The CSS2 parser will <span
374+
class="index-inst" title="skip"><a href="#skip">skip</a></span> these
360375
declarations, effectively reducing the style sheet to:
361376

362-
<PRE>
377+
<PRE class="example">
363378
H1 { color: red; }
364379
P { color: blue; font-variant: small-caps }
365380
EM EM { font-style: normal }
@@ -388,8 +403,8 @@ errors</a></H2>
388403
when it encounters these parsing errors:
389404

390405
<UL>
391-
<LI><strong>Unknown properties.</strong>
392-
User agents must ignore a <a
406+
<LI><strong>Unknown properties.</strong> User agents must <span
407+
class="index-inst" title="skip"><a href="#skip">skip</a></span> a <a
393408
href="syndata.html#declaration">declaration</a> with an unknown
394409
property. For example, if the style sheet is:
395410

@@ -415,7 +430,8 @@ weren't there at all:
415430
</PRE>
416431

417432
<P> In the above example, a CSS2 parser would honor the first rule and
418-
ignore the rest, as if the style sheet had been:
433+
<span class="index-inst" title="skip"><a href="#skip">skip</a></span>
434+
the rest, as if the style sheet had been:
419435

420436
<PRE>
421437
IMG { float: left }
@@ -427,10 +443,11 @@ ignore the rest, as if the style sheet had been:
427443
<P>A UA conforming to a future CSS specification may accept one or
428444
more of the other rules as well.</P>
429445

430-
<LI>User agents must ignore an invalid at-keyword together with everything
431-
following it, up to and including the next semicolon (;) or brace pair
432-
({...}), whichever comes first. For example, assume the style sheet
433-
reads:
446+
<LI>User agents must <span class="index-inst" title="skip"><a
447+
href="#skip">skip</a></span> an invalid at-keyword together with
448+
everything following it, up to and including the next semicolon (;) or
449+
brace pair ({...}), whichever comes first. For example, assume the
450+
style sheet reads:
434451

435452
<PRE>
436453
@three-dee {
@@ -444,9 +461,11 @@ reads:
444461
</PRE>
445462

446463
<P> The '@three-dee' at-rule is not part of CSS2. Therefore, the whole
447-
at-rule (up to, and including, the third right curly brace) is
448-
ignored. The CSS2 UA skips it, effectively reducing the style sheet
449-
to:
464+
at-rule (up to, and including, the third right curly brace) is <span
465+
class="index-inst" title="skip"><a href="#skip">skipped.</a></span> A
466+
CSS2 UA <span class="index-inst" title="skip"><a
467+
href="#skip">skips</a></span> it, effectively reducing the style sheet
468+
to:</P>
450469

451470
<PRE>
452471
H1 { color: blue }

0 commit comments

Comments
 (0)