8000 [css2] Modified to allow anchors in headers (new toc, subtoc generati… · bocoup/csswg-drafts@c1fe071 · GitHub
Skip to content

Commit c1fe071

Browse files
committed
[css2] Modified to allow anchors in headers (new toc, subtoc generation). This allows properties/descriptors t to appear anywhere in the spec with no H4 necessary. A simple include will do everything
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40211
1 parent 7df6e36 commit c1fe071

23 files changed

Lines changed: 384 additions & 324 deletions

css2/DOC/CONVENTIONS

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,29 @@ Global structure
1313

1414
* It's ok to include GIF files in the spec.
1515

16+
************
17+
TABLE OF CONTENTS
18+
************
19+
The toc will be generated from H? markup. Headers should not
20+
contain anchors unless those anchors follow a ":". For
21+
example the following is ok:
22+
23+
<h3>Margin properties: <a href="...">, <a href="...></h3>
24+
25+
And "Margin properties" will be replaced by an anchor whose content
26+
is "Margin properties" and a heading number.
1627

1728
************
1829
Properties
1930
************
2031
In source file:
2132

22-
<H4><a name="propdef-propname">'propname'</a></H4>
2333
<!-- #include src=properties/propname.srb -->
2434

25-
Where "propdef-propname" is a keyword and the propname between
26-
single quotes (and wherever it appears below) is the name
27-
of the property.
28-
2935
The following will be generated:
3036

3137
<DIV class="propdef">
38+
<P><a name="propdef-propname" class="propdef-title"><strong>'propname'</strong></a></P>
3239
<TABLE class="propinfo">
3340
<TR><TH>Property name:<TD>
3441
<span title="propname" class="index-def">'propname'</span></TR>
@@ -202,7 +209,7 @@ Document HEAD
202209

203210
<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
204211
<html lang="en">
205-
<!-- $Id: CONVENTIONS,v 1.10 1997-09-10 22:37:41 ian Exp $ -->
212+
<!-- $Id: CONVENTIONS,v 1.11 1997-10-03 20:52:40 ian Exp $ -->
206213
<HEAD>
207214
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
208215
<TITLE>CSS2 Specification</TITLE>

css2/DOC/todo.db

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@
8585
85 0 References: what's the difference between normative and informative references H�kon - 27 Sep 1997 - - -
8686
86 0 Global: enforce single quotes around valid HTML/CSS code H�kon - 27 Sep 1997 - - -
8787
87 0 Global: try to reduce max number of levels from 4 to 3 H�kon - 27 Sep 1997 - - -
88-
88 0 Find better name for "object language"? - - 27 Sep 1997 - - -
88+
88 0 Find better name for "object language"? - - 27 Sep 1997 03 Oct 1997 - Call it document language
8989
bbos 0 Find property values that should use 'integer' instead of 'number' properties.db - 30 Sep 1997 02 Oct 1997 - Replaced <number> with <integer> for column-span, row-span, widow, and orphan

css2/aural.src

Lines changed: 45 additions & 41 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: aural.src,v 1.4 1997-09-24 22:14:36 ian Exp $ -->
3+
<!-- $Id: aural.src,v 1.5 1997-10-03 20:38:47 ian Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Aural style sheets</TITLE>
@@ -69,9 +69,8 @@ views to produce truly multi-modal documents.
6969

7070
<H2>Aural cascading style sheet properties</H2>
7171

72-
<H3>Volume properties</H3>
72+
<H3>Volume properties: <span class="propinst-volume">'volume'</span></H3>
7373

74-
<H4><a name="propdef-volume">'volume'</a></H4>
7574
<!-- #include src=properties/volume.srb -->
7675

7776
<P>The legal range of percentage values is 0% to 100%. Note that '0%'
@@ -127,9 +126,8 @@ dynamic range.
127126
<p>The same authors stylesheet could be used in all cases, simply by
128127
mapping the 0 and 100 points suitably at the client side.
129128

130-
<H3>Speaking properties</H3>
129+
<H3>Speaking properties: <span class="propinst-speak">'speak'</span></H3>
131130

132-
<H4><a name="propdef-speak">'speak'</a></H4>
133131
<!-- #include src=properties/speak.srb -->
134132

135133
<P>This property specifies whether text will be rendered aurally and
@@ -168,13 +166,19 @@ the volume to a non-silent value and will then be spoken.
168166
has the value 'none' are not spoken and take no time. Child elements
169167
may however override this value and may be spoken normally.
170168

171-
<H3>Pause properties</H3>
169+
<H3>Pause properties: <span
170+
class="propinst-pause-before">'pause-before'</span>, <span
171+
class="propinst-pause-after">'pause-after'</span>, and <span
172+
class="propinst-pause">'pause'</span></H3>
172173

174+
<!-- #include src=properties/pause-before.srb -->
173175

174-
<P>This property specifies the pause before an element is spoken. It
175-
may be given in an absolute units (seconds, milliseconds) or as a
176-
relative value, in which case it is relative to the reciprocal of the
177-
<span class="propinst-speech-rate">'speech-rate'</span> property. If
176+
<P>The <span
177+
class="propinst-pause-before">'pause-before'</span> property specifies
178+
the pause before an element is spoken. It may be given in an absolute
179+
units (seconds, milliseconds) or as a relative value, in which case it
180+
is relative to the reciprocal of the <span
181+
class="propinst-speech-rate">'speech-rate'</span> property. If
178182
speech-rate is 120 words per minute (i.e., a word takes half a second,
179183
500 milliseconds) then a <span
180184
class="propinst-pause-before">'pause-before'</span> of 100% means a
@@ -185,14 +189,12 @@ class="propinst-pause-before">'pause-before'</span> of 20% means
185189
<p>Using relative units gives more robust stylesheets in the face of
186190
large changes in speech-rate and is recommended practice.
187191

188-
<H4><a name="propdef-pause-after">'pause-after'</a></H4>
189192
<!-- #include src=properties/pause-after.srb -->
190193

191194
<P>This property specifies the pause after an element is
192195
spoken. Values are specified the same way as <span
193196
class="propinst-pause-before">'pause-before'</span>.
194197

195-
<H4><a name="propdef-pause">'pause'</a></H4>
196198
<!-- #include src=properties/pause.srb -->
197199

198200
<P>The <span class="propinst-pause">'pause'</span> property is a
@@ -214,12 +216,13 @@ Examples:
214216
</PRE>
215217
</div>
216218

217-
<H3>Cue properties</H3>
219+
<H3>Cue properties: <span
220+
class="propinst-cue-before">'cue-before'</span>, <span
221+
class="propinst-cue-after">'cue-after'</span>, and <span
222+
class="propinst-cue">'cue'</span></H3>
218223

219-
<H4><a name="propdef-cue-before">'cue-before'</a></H4>
220224
<!-- #include src=properties/cue-before.srb -->
221225

222-
<H4><a name="propdef-cue-after">'cue-after'</a></H4>
223226
<!-- #include src=properties/cue-after.srb -->
224227

225228
<P>Auditory icons are another way to distinguish semantic
@@ -241,7 +244,6 @@ than using two special-purpose properties. This would be more
241244
general.</p>
242245
-->
243246

244-
<H4><a name="propdef-cue">'cue'</a></H4>
245247
<!-- #include src=properties/cue.srb -->
246248

247249
<P>The same sound can be used both before and after, using the
@@ -257,9 +259,9 @@ The following two rules are equivalent:
257259
</div>
258260

259261

260-
<H3>Mixing properties</H3>
262+
<H3>Mixing properties: <span
263+
class="propinst-play-during">'play-during'</span></H3>
261264

262-
<H4><a name="propdef-play-during">'play-during'</a></H4>
263265
<!-- #include src=properties/play-during.srb -->
264266

265267
<p>Similar to the <span
@@ -300,21 +302,23 @@ right channels should be placed to either side of this position.
300302

301303
<!-- ================================================================== -->
302304

303-
<H3>Spatial properties</H3>
305+
<H3>Spatial properties: <span
306+
class="propinst-azimuth">'azimuth'</span> and
307+
<span class="propinst-elevation">'elevation'</span>
308+
</H3>
304309

305310
<p>Spatial audio is an important stylistic property for aural
306311
presentation. It provides a natural way to tell several voices apart,
307312
the same way we use in real life (people rarely all stand in the same
308-
spot in a room). Stereo speakers produce a lateral
309-
sound stage. Binaural headphones or the increasingly popular 5-speaker
310-
home theater setups can generate full surround sound, and
311-
multi-speaker setups can create a true three-dimensional
312-
sound stage. VRML 2.0 also includes spatial audio (and uses the same
313-
azimuth and elevation terms, which originate in astronomy), which
314-
implies that in time consumer-priced spatial audio hardware will
315-
become more widely available.
316-
317-
<H4><a name="propdef-azimuth">'azimuth'</a></H4>
313+
spot in a room). Stereo speakers produce a lateral sound
314+
stage. Binaural headphones or the increasingly popular 5-speaker home
315+
theater setups can generate full surround sound, and multi-speaker
316+
setups can create a true three-dimensional sound stage. VRML 2.0 also
317+
includes spatial audio (and uses the same azimuth and elevation terms,
318+
which originate in astronomy), which implies that in time
319+
consumer-priced spatial audio hardware will become more widely
320+
available.
321+
318322
<!-- #include src=properties/azimuth.srb -->
319323

320324
<P>The value is given in the range -360deg &lt;= x &lt; 360deg where
@@ -371,7 +375,6 @@ values. One method is as follows:
371375
<li>if 180deg &lt; x &lt;= 270deg then x := 540deg - x
372376
</ul>
373377

374-
<H4><a name="propdef-elevation">'elevation'</a></H4>
375378
<!-- #include src=properties/elevation.srb -->
376379

377380
<P>The value is given in degrees in the range -90deg to 90deg. 0deg is
@@ -396,9 +399,19 @@ Examples:
396399
</div>
397400

398401

399-
<h3>Voice characteristic properties</h3>
402+
<h3>Voice characteristic properties: <span
403+
class="propinst-speech-rate">'speech-rate'</span>, <span
404+
class="propinst-voice-family">'voice-family'</span>,
405+
<span class="propinst-pitch">'pitch'</span>,
406+
<span class="propinst-pitch-range">'pitch-range'</span>,
407+
<span class="propinst-stress">'stress'</span>,
408+
<span class="propinst-richness">'richness'</span>,
409+
<span class="propinst-speak-punctuation">'speak-punctuation'</span>,
410+
<span class="propinst-speak-date">'speak-date'</span>,
411+
<span class="propinst-speak-numeral">'speak-numeral'</span>, and
412+
<span class="propinst-speak-time">'speak-time'</span>
413+
</h3>
400414

401-
<H4><a name="propdef-speech-rate">'speech-rate'</a></H4>
402415
<!-- #include src=properties/speech-rate.srb -->
403416

404417
<P>Specifies the speaking rate. Note that both absolute and relative
@@ -409,7 +422,6 @@ somewhat by language but is nevertheless widely supported by speech
409422
synthesizers. The value 'medium' refers to the reader's preferred
410423
speech-rate setting. Relative values may be cascaded more readily.
411424

412-
<H4><a name="propdef-voice-family">'voice-family'</a></H4>
413425
<!-- #include src=properties/voice-family.srb -->
414426

415427
<P>The value is a prioritized list of voice family names (compare
@@ -435,19 +447,16 @@ fonts). If so, what are the values that describe these voice families
435447
in a way that is independent of speech synthesizer?
436448
-->
437449

438-
<H4><a name="propdef-pitch">'pitch'</a></H4>
439450
<!-- #include src=properties/pitch.srb -->
440451

441452
<p>Specifies the average pitch of the speaking voice in hertz (Hz).
442453

443-
<H4><a name="propdef-pitch-range">'pitch-range'</a></H4>
444454
<!-- #include src=properties/pitch-range.srb -->
445455

446456
<p>Specifies variation in average pitch. A pitch range of 0% produces
447457
a flat, monotonic voice. A pitch range of 50% produces normal
448458
inflection. Pitch ranges greater than 50% produce animated voices.
449459

450-
<H4><a name="propdef-stress">'stress'</a></H4>
451460
<!-- #include src=properties/stress.srb -->
452461

453462
<p>Specifies the level of stress (assertiveness or emphasis) of the
@@ -462,7 +471,6 @@ more strongly inflected. It is in a sense dual to the <span
462471
class="propinst-pitch-range">'pitch-range'</span> property and is
463472
provided to allow developers to exploit higher-end auditory displays.
464473

465-
<H4><a name="propdef-richness">'richness'</a></H4>
466474
<!-- #include src=properties/richness.srb -->
467475

468476
<P>Specifies the richness (brightness) of the speaking voice. The
@@ -474,15 +482,13 @@ voice.
474482
<P><EM>The following four properties are <STRONG>very</STRONG>
475483
preliminary</EM>; discussion is invited:
476484

477-
<H4><a name="propdef-speak-punctuation">'speak-punctuation'</a></H4>
478485
<!-- #include src=properties/speak-punctuation.srb -->
479486

480487
<p>A value of 'code' indicates that punctuation such as semicolons,
481488
braces, and so on are to be spoken literally. The default value of
482489
'none' means that punctuation is not spoken but instead is rendered
483490
naturally as various pauses.
484491

485-
<H4><a name="propdef-speak-date">'speak-date'</a></H4>
486492
<!-- #include src=properties/speak-date.srb -->
487493

488494

@@ -501,10 +507,8 @@ HTML tag used to identify dates, such as:
501507
</pre>
502508
</div>
503509

504-
<H4><a name="propdef-speak-numeral">'speak-numeral'</a></H4>
505510
<!-- #include src=properties/speak-numeral.srb -->
506511

507-
<H4><a name="propdef-speak-time">'speak-time'</a></H4>
508512
<!-- #include src=properties/speak-time.srb -->
509513

510514
</BODY>

css2/bin/Attic/dextr

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# <span class="propinst-name">&lt;'name'&gt;</span>
1313
#
1414
# Ian Jacobs - ij@w3.org (Based on work by Arnaud Le Hors)
15-
# $Id: dextr,v 1.2 1997-09-23 17:54:43 ian Exp $
15+
# $Id: dextr,v 1.3 1997-10-03 20:53:48 ian Exp $
1616

1717
$PROGNAME = substr($0, rindex($0, "/") + 1);
1818

@@ -43,12 +43,13 @@ $patt = "$sp(.*?)$sp";
4343
$blockst = "[/][*]";
4444
$blocket = "[*][/]";
4545

46-
sub format_property {
46+
sub format_descriptor {
4747
$name = $_[0];
4848
$values = $_[1];
4949
$init = $_[2];
50-
print output "<DIV class=\"propdef\">\n";
51-
print output "<TABLE class=\"propinfo\">\n";
50+
print output "<DIV class=\"descdef\">\n";
51+
print output "<P><a name=\"descdef-$name\" class=\"descdef-title\"><strong>'$name'</strong> (Descriptor)</a></P>\n";
52+
print output "<TABLE class=\"descinfo\">\n";
5253
&format_name($name);
5354
&format_values($values);
5455
&format_init($init);
@@ -84,7 +85,7 @@ while (/$blockst$patt;;$patt;;$patt$blocket/s) {
8485
$output = "$path$1.srb";
8586
print "\textracting $output\n";
8687
open(output, "> $output");
87-
&format_property($1, $2, $3);
88+
&format_descriptor($1, $2, $3);
8889
close(output);
8990
$_ = $placeholder;
9091
}

css2/bin/Attic/mksubtoc

Lines changed: 6 additions & 9 deletions
+
print OUTPUT "<li><a href=\"$url\"$rel>$txt</a>$2\n";
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# sub TOC builder
33
#
44
# Arnaud Le Hors - lehors@w3.org
5-
# $Id: mksubtoc,v 1.2 1997-09-19 16:02:01 lehors Exp $
5+
# $Id: mksubtoc,v 1.3 1997-10-03 20:54:17 ian Exp $
66

77
if (($_ = $ARGV[0], /^-r/) && $ARGV[0]) {
88
shift;
@@ -104,10 +104,6 @@ sub cleanup {
104104
$text = $_[0];
105105
$text =~ s/<a(.*?)>//sgi;
106106
$text =~ s/<\/a>//sgi;
107-
$text =~ s/<samp[ \t\n]+class=\"edef/<samp class=\"einst/sgi;
108-
$text =~ s/<samp[ \t\n]+class=\"einst/<samp class=\"einst2/sgi;
109-
$text =~ s/<samp[ \t\n]+class=\"adef/<samp class=\"ainst/sgi;
110-
$text =~ s/<samp[ \t\n]+class=\"ainst/<samp class=\"ainst2/sgi;
111107
return $text;
112108
}
113109

@@ -126,11 +122,12 @@ foreach $file (@ARGV) {
126122
$hfil =~ s/\.src/\.html/;
127123
$rpath = rpath($realpath, $hfil);
128124
$_ = $buf;
129-
while (/$file;(.*?);([0-9]*);([1-9A-Z].*?)\n/si) {
125+
# Allow anchors after ":" in header text.
126+
while (/$file;(.*?)(:[^a-zA-Z].*?)?;([0-9]*);([1-9A-Z].*?)\n/si) {
130127
$t = $1;
131-
$h = int($2);
128+
$h = int($3);
132129
if ($h > $startlvl && ($maxlvl == 0 || $h <= $maxlvl)) {
133-
$num = $3;
130+
$num = $4;
134131
ol($h);
135132
if ($h == 1) { # if H1 go to the top of the page and set rel
136133
$url = "$rpath";
@@ -140,7 +137,7 @@ foreach $file (@ARGV) {
140137
$rel = "";
141138
}
142139
$txt = cleanup($t);
143-
print OUTPUT "<li><a href=\"$url\"$rel>$txt</a>\n";
140
144141
}
145142
$_ = $';
146143
}

0 commit comments

Comments
 (0)