Skip to content

Commit ec75e25

Browse files
committed
[css2] Changes based on San Jose. Restructuring and property databases
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%4055
1 parent 4ed309a commit ec75e25

22 files changed

Lines changed: 1606 additions & 1971 deletions

css2/DOC/CONVENTIONS

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,21 @@ Global structure
1717
************
1818
Properties
1919
************
20-
* To mark up property definitions. For a property named "propname", use:
21-
20+
In source file:
21+
22+
<H4><a name="propdef-propname">'propname'</a></H4>
23+
<!-- #include src=properties/propname.srb -->
24+
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+
29+
The following will be generated:
30+
2231
<DIV class="propdef">
23-
<H4 class="propname">
24-
<a name="propdef-propname">
25-
<span title="propname" class="index-def">
26-
'propname'</span></a></H4>
2732
<TABLE class="propinfo">
28-
<TR><TH>Property name:<TD>...</TR>
33+
<TR><TH>Property name:<TD>
34+
<span title="propname" class="index-def">'propname'</span></TR>
2935
<TR><TH>Value:<TD>...</TR>
3036
<TR><TH>Initial:<TD>...</TR>
3137
<TR><TH>Applies to:<TD>...</TR>
@@ -51,7 +57,9 @@ Properties
5157

5258
This will generate:
5359

54-
<a href="..." class="propinst"><span class="propinst-propname">'propname'</span></a>
60+
<a href="..." class="propinst">
61+
<span class="propinst-propname">'propname'</span>
62+
</a>
5563

5664
- Property instances will link to the definitions.
5765

@@ -92,7 +100,9 @@ The "value" in the text may be marked up (e.g., &lt;value&gt;)
92100
This will generate the same thing with an A element around the inner
93101
span:
94102

95-
<a href="..." class="value-inst"><span class="value-inst-value">value</span></a>
103+
<a href="..." class="value-inst">
104+
<span class="value-inst-value">value</span>
105+
</a>
96106

97107
************
98108
Indexes
@@ -192,7 +202,7 @@ Document HEAD
192202

193203
<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
194204
<html lang="en">
195-
<!-- $Id: CONVENTIONS,v 1.8 1997-08-12 20:35:49 ian Exp $ -->
205+
<!-- $Id: CONVENTIONS,v 1.9 1997-09-09 00:02:00 ian Exp $ -->
196206
<HEAD>
197207
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
198208
<TITLE>CSS2 Specification</TITLE>

css2/DOC/TODO.html

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
44
<META NAME="GENERATOR" CONTENT="Mozilla/4.02b7 [en] (X11; I; Linux 2.0.29 i686) [Netscape]">
55
<TITLE>CSS2 TODO List</TITLE>
6-
<!--$Id: TODO.html,v 1.3 1997-09-08 03:00:21 ian Exp $-->
6+
<!--$Id: TODO.html,v 1.4 1997-09-09 00:02:19 ian Exp $-->
77
</HEAD>
88
<BODY>
99

1010
<H1>CSS2 TODO List</H1>
11-
Last Update: $Date: 1997-09-08 03:00:21 $
11+
Last Update: $Date: 1997-09-09 00:02:19 $
1212
<TABLE BORDER CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
1313
<CAPTION>Unresolved editorial changes</CAPTION>
1414

@@ -130,7 +130,8 @@ <H1>CSS2 TODO List</H1>
130130
<TD>5</TD>
131131

132132
<TD>Replace ascii art with images. Notably, example of list items is
133-
wrong (margin applies to block, not to marker).</TD>
133+
wrong (margin applies to block, not to marker). Suggested:
134+
use OBJECT for images and then long description.</TD>
134135

135136
<TD></TD>
136137

@@ -274,20 +275,52 @@ <H1>CSS2 TODO List</H1>
274275
<TR>
275276
<TD>13</TD>
276277

277-
<TD>Put font information in right place (i.e., some of
278-
what's in appendix doesn't belong there)</TD>
278+
<TD>In cursors, rename "hand" value</TD>
279279

280280
<TD></TD>
281281

282-
<TD>Ian and Chris</TD>
282+
<TD>Ian</TD>
283283

284-
<TD>Chris</TD>
284+
<TD>San Jose ftf</TD>
285285

286286
<TD>25 Aug 1997</TD>
287287

288288
<TD>No.</TD>
289289
</TR>
290290

291+
<TR>
292+
<TD>14</TD>
293+
294+
<TD>Fix percentage values for pitch-range/stress/richness</TD>
295+
296+
<TD></TD>
297+
298+
<TD>All</TD>
299+
300+
<TD>Ian</TD>
301+
302+
<TD>25 Aug 1997</TD>
303+
304+
<TD>No.</TD>
305+
</TR>
306+
307+
<TR>
308+
<TD>14</TD>
309+
310+
<TD>What is the syntax of integers and numbers? (For syndata.src)</TD>
311+
312+
<TD></TD>
313+
314+
<TD>All</TD>
315+
316+
<TD>Ian</TD>
317+
318+
<TD>8 Sep 1997</TD>
319+
320+
<TD>No.</TD>
321+
</TR>
322+
323+
291324
</TABLE>
292325
&nbsp;
293326
</BODY>

css2/Makefile

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile to generate the CSS2 document based on its "source files"
22
# Arnaud Le Hors - lehors@w3.org
3-
# $Id: Makefile,v 1.16 1997-09-08 02:51:07 ian Exp $
3+
# $Id: Makefile,v 1.17 1997-09-08 23:52:45 ian Exp $
44

55
ROOT = .
66

@@ -79,6 +79,11 @@ STYLESHEETS= style/*.css
7979

8080
ALLOBJS= $(SPECOBJS) $(INDEXES) $(IMAGES) $(STYLESHEETS) translations.html
8181

82+
PROPSRC= properties/properties.db
83+
DESCSRC= properties/descriptors.db
84+
PROPBLKSDIR= build/properties
85+
DESCBLKSDIR= build/descriptors
86+
8287
INSTALLDIR= /afs/w3.org/pub/WWW/Style/Group/css2
8388

8489
# dbase for property name anchors
@@ -89,6 +94,7 @@ VALUEDB= build/value.db
8994
HEADINGDB= build/headings.db
9095

9196
PERL= perl5
97+
NSGMLS=nsgmls
9298

9399
# HTML include preprocessor (for includes)
94100
HIPP= $(PERL) ./bin/hipp
@@ -114,6 +120,10 @@ MKSUBTOC= $(PERL) ./bin/mksubtoc
114120
INSAFTER= $(PERL) ./bin/insafter
115121
# add link
116122
ADDLINKS= $(PERL) ./bin/addlinks
123+
# extract properties from db.
124+
PEXTR= ./bin/pextr
125+
# extract descriptors from db.
126+
DEXTR= ./bin/dextr
117127

118128
# utility to generate the PostScript version
119129
# -R seems broken for this spec.
@@ -144,7 +154,7 @@ LN= ln
144154
$(RM) build/subtoc.$$$$
145155

146156

147-
all: $(PROPERTYDB) $(VALUEDB) $(HEADINGDB) $(SPECOBJS) $(INDEXES)
157+
all: blocks $(PROPERTYDB) $(VALUEDB) $(HEADINGDB) $(SPECOBJS) $(INDEXES)
148158

149159
install: all css20.tgz
150160
@if [ ! -d $(INSTALLDIR) ]; then mkdir -p $(INSTALLDIR);fi
@@ -176,6 +186,20 @@ css20.tgz:
176186
css20.zip:
177187
$(ZIP) $@ $(ALLOBJS)
178188

189+
#### Section generate property/descriptor tables from property database.
190+
191+
blocks: $(PROPBLKSDIR)/blocks.ok $(DESCBLKSDIR)/blocks.ok
192+
193+
$(PROPBLKSDIR)/blocks.ok: $(PROPSRC)
194+
@if [ ! -d $(PROPBLKSDIR) ]; then mkdir -p $(PROPBLKSDIR);fi
195+
$(PEXTR) $(PROPSRC) $(PROPBLKSDIR)
196+
touch $@
197+
198+
$(DESCBLKSDIR)/blocks.ok: $(DESCSRC)
199+
@if [ ! -d $(DESCBLKSDIR) ]; then mkdir -p $(DESCBLKSDIR);fi
200+
$(DEXTR) $(DESCSRC) $(DESCBLKSDIR)
201+
touch $@
202+
179203
$(PROPERTYDB): $(SPECSRCS)
180204
@if [ ! -d build ]; then mkdir build;fi
181205
$(MKANCHDB) propdef - $(SPECSRCS) | sed 's/\.src/\.html/' > $@
@@ -208,8 +232,16 @@ index.html: index.src
208232
$(HIPP) $(INCLUDES) $< - | \
209233
$(ADDNAVBAR) -r $@ - $@ contents "cover.html#toc"
210234

235+
### check on the document to see if it's valid
236+
237+
check: all
238+
@for i in $(MAINOBJS) $(APPENDIXES) $(REFS) $(INDEXES) ; \
239+
do echo checking $$i...; $(NSGMLS) -s -c sgml/HTML4.cat $$i; done; \
240+
echo checking done.
241+
211242
clean:
212-
$(RM) $(SPECOBJS) $(SPECIALOBJS) $(INDEXES) build/* css20.*
243+
$(RM) $(SPECOBJS) $(SPECIALOBJS) $(INDEXES) $(PROPBLKSDIR)/* \
244+
$(DESCBLKSDIR)/* build/* css20.*
213245

214246
realclean: clean
215247

css2/bin/Attic/dextr

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/usr/local/bin/perl
2+
# Extract entries from the CSS properties database
3+
# The database has the following format:
4+
# name;; values;; initial-value
5+
# Special characters:
6+
# 1) Translate "*" into the words "all elements"
7+
# 1.a) Translate "XX" into "not defined for shorthand properties"
8+
# 2) "<name>" means the value is defined elsewhere. Translate to
9+
# <span class="value-inst-name">&lt;name&gt;</span>
10+
# 3) "<'name'>" means the set of values is the same as for the
11+
# property with the same name. Translate to
12+
# <span class="propinst-name">&lt;'name'&gt;</span>
13+
#
14+
# Ian Jacobs - ij@w3.org (Based on work by Arnaud Le Hors)
15+
# $Id: dextr,v 1.1 1997-09-09 00:02:46 ian Exp $
16+
17+
$PROGNAME = substr($0, rindex($0, "/") + 1);
18+
19+
if (!$ARGV[0]) {
20+
print "Usage: $PROGNAME file [tgt_dir]\n";
21+
exit 1;
22+
}
23+
24+
# copy file in memory
25+
if (!open(input, $ARGV[0])) {
26+
print "$PROGNAME Error: Cannot open file: $ARGV[0]\n";
27+
exit 1;
28+
}
29+
$buf = "";
30+
while (<input>) {
31+
$buf .= $_;
32+
}
33+
close(input);
34+
35+
$path = "";
36+
if ($ARGV[1]) {
37+
$path = "$ARGV[1]/";
38+
}
39+
40+
# regexps
41+
$sp = "[ \t\n]*"; # whitespace
42+
$patt = "$sp(.*?)$sp";
43+
$blockst = "[/][*]";
44+
$blocket = "[*][/]";
45+
46+
sub format_property {
47+
$name = $_[0];
48+
$values = $_[1];
49+
$init = $_[2];
50+
print output "<DIV class=\"propdef\">\n";
51+
print output "<TABLE class=\"propinfo\">\n";
52+
&format_name($name);
53+
&format_values($values);
54+
&format_init($init);
55+
print output "</TABLE>\n";
56+
print output "</DIV>\n\n";
57+
}
58+
59+
sub format_name {
60+
print output "<TR><TH align=\"right\">Descriptor name:";
61+
print output "<TD><span class=\"index-def\" title=\"'$_[0]' (descriptor)\">\'$_[0]\'</span></TR>\n";
62+
}
63+
64+
sub format_values {
65+
$values = $_[0];
66+
$values =~ s/<([^>']*)>/<span class=\"value-inst-$1\">&lt;$1&gt;<\/span>/g;
67+
$values =~ s/<[']([^']*)[']>/<span class=\"propinst-$1\">&lt;'$1'&gt;<\/span>/g;
68+
print output "<TR><TH align=\"right\">Value:<TD>$values</TR>\n";
69+
}
70+
71+
sub format_init {
72+
$init = $_[0];
73+
$init =~ s/XX/not defined for shorthand properties/g;
74+
$init =~ s/<([^>']*)>/<span class=\"value-inst-$1\">&lt;$1&gt;<\/span>/g;
75+
$init =~ s/<[']([^']*)[']>/<span class=\"propinst-$1\">&lt;'$1'&gt;<\/span>/g;
76+
print output "<TR><TH align=\"right\">Initial:<TD>$init</TR>\n";
77+
}
78+
79+
# extract every possible block
80+
$_ = $buf;
81+
while (/$blockst$patt;;$patt;;$patt$blocket/s) {
82+
# Set parameters first (before any modifications)
83+
$placeholder = $';
84+
$output = "$path$1.srb";
85+
print "\textracting $output\n";
86+
open(output, "> $output");
87+
&format_property($1, $2, $3);
88+
close(output);
89+
$_ = $placeholder;
90+
}

css2/bin/Attic/pextr

Lines changed: 15 additions & 6 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: pextr,v 1.1 1997-09-08 18:24:13 ian Exp $
15+
# $Id: pextr,v 1.2 1997-09-09 00:03:03 ian Exp $
1616

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

@@ -50,10 +50,11 @@ $init = $_[2];
5050
$applies = $_[3];
5151
$inherited = $_[4];
5252
$percentages = $_[5];
53+
#Do next three lines in src files to get headings right.
54+
#print output "<H4>";
55+
#print output "<a name=\"propdef-$name\">'$name'</a>\n";
56+
#print output "</H4>\n";
5357
print output "<DIV class=\"propdef\">\n";
54-
print output "<H4 class=\"propname\">\n";
55-
print output "<a name=\"propdef-$name\">'$name'</a>\n";
56-
print output "</H4>\n";
5758
print output "<TABLE class=\"propinfo\">\n";
5859
&format_name($name);
5960
&format_values($values);
@@ -78,16 +79,20 @@ print output "<TR><TH align=\"right\">Value:<TD>$values</TR>\n";
7879
}
7980

8081
sub format_init {
82+
#Note that in the case of properties, <> are removed in text.
8183
$init = $_[0];
8284
$init =~ s/XX/not defined for shorthand properties/g;
8385
$init =~ s/<([^>']*)>/<span class=\"value-inst-$1\">&lt;$1&gt;<\/span>/g;
84-
$init =~ s/<[']([^']*)[']>/<span class=\"propinst-$1\">&lt;'$1'&gt;<\/span>/g;
86+
$init =~ s/<[']([^']*)[']>/<span class=\"propinst-$1\">'$1'<\/span>/g;
8587
print output "<TR><TH align=\"right\">Initial:<TD>$init</TR>\n";
8688
}
8789

8890
sub format_applies {
91+
#Note that in the case of properties, <> are removed in text.
8992
$applies = $_[0];
9093
$applies =~ s/\*/all elements/g;
94+
$applies =~ s/<([^>']*)>/<span class=\"value-inst-$1\">&lt;$1&gt;<\/span>/g;
95+
$applies =~ s/<[']([^']*)[']>/<span class=\"propinst-$1\">'$1'<\/span>/g;
9196
print output "<TR><TH align=\"right\">Applies to:<TD>$applies</TR>\n";
9297
}
9398

@@ -96,7 +101,11 @@ print output "<TR><TH align=\"right\">Inherited:<TD>$_[0]</TR>\n";
96101
}
97102

98103
sub format_percentages {
99-
print output "<TR><TH align=\"right\">Percentage values:<TD>$_[0]</TR>\n";
104+
#Note that in the case of properties, <> are removed in text.
105+
$perc = $_[0];
106+
$perc =~ s/<([^>']*)>/<span class=\"value-inst-$1\">&lt;$1&gt;<\/span>/g;
107+
$perc =~ s/<[']([^']*)[']>/<span class=\"propinst-$1\">'$1'<\/span>/g;
108+
print output "<TR><TH align=\"right\">Percentage values:<TD>$perc</TR>\n";
100109
}
101110

102111
# extract every possible block

0 commit comments

Comments
 (0)