Skip to content

Commit 0adb0af

Browse files
committed
[css2] Now uses class "xref" to explicitly allow page numbers, instead of
"noxref" to disallow them. This obviates the need for the -x option of addlinks. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401721
1 parent 778d19b commit 0adb0af

6 files changed

Lines changed: 30 additions & 26 deletions

File tree

css2/bin/Attic/addlinks

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# Arnaud Le Hors - lehors@w3.org
1313
# Modifications by Bert Bos <bert@w3.org>
14-
# $Id: addlinks,v 2.5 1998-05-04 20:16:00 bbos Exp $
14+
# $Id: addlinks,v 2.6 1998-05-13 10:58:55 bbos Exp $
1515

1616
use DB_File;
1717
use Getopt::Std;
@@ -50,9 +50,9 @@ sub gen_anch {
5050
my ($key, $stag, $content, $etag, $xrefon) = @_;
5151
my $anch = $anchors{$key};
5252
# Make html2ps add page numbers if $xrefon is true,
53-
# unless there is an explicit "noxref" specified on the element.
53+
# or if there is an explicit "xref" specified on the element.
5454
if ($xrefon) {$class = "";} else {$class = " class=\"noxref\"";}
55-
if ($stag =~ /\bnoxref\b/) {$class = " class=\"noxref\"";}
55+
if ($stag =~ /\bxref\b/) {$class = "";}
5656
if (! defined $anch) {
5757
warn "$PROG: index $_[0] not found\n";
5858
$anch = "";

css2/bin/Attic/mkdescidx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/local/bin/perl
22
# Index of descriptor names.
33
# Arnaud Le Hors lehors@w3.org/Ian Jacobs ij@w3.org
4-
# $Id: mkdescidx,v 2.1 1998-05-04 20:16:04 bbos Exp $
4+
# $Id: mkdescidx,v 2.2 1998-05-13 10:59:02 bbos Exp $
55
use English;
66

77

@@ -75,8 +75,7 @@ sub cleanup {
7575

7676
sub format_name {
7777
$name = cleanup($_[0]);
78-
# print OUTPUT "<td><span class=\"descinst-" . $name . ", xref\">'" . $name . "'<\/span>\n";
79-
print OUTPUT "<td><span class=\"descinst-" . $name . "\">'" . $name . "'<\/span>\n";
78+
print OUTPUT "<td><span class=\"descinst-" . $name . " xref\">'" . $name . "'<\/span>\n";
8079
}
8180

8281

@@ -86,8 +85,8 @@ sub format_val {
8685
$value = $_[0];
8786
$value =~ s/^[ \t\n]+//gs;
8887
$value =~ s/[ \t\n]+$//gs;
89-
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1 noxref\">\&lt\;\1\&gt\;<\/span>/sgi;
90-
$value =~ s/\<\'(.+?)\'\>/<span class=\"descinst-\1 noxref\">\'\1\'<\/span>/sgi;
88+
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1\">\&lt\;\1\&gt\;<\/span>/sgi;
89+
$value =~ s/\<\'(.+?)\'\>/<span class=\"descinst-\1\">\'\1\'<\/span>/sgi;
9190
print OUTPUT "<td>$value\n";
9291
}
9392

css2/bin/Attic/mkpropidx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/local/bin/perl
22
# Index of property names.
33
# Arnaud Le Hors lehors@w3.org/Ian Jacobs ij@w3.org
4-
# $Id: mkpropidx,v 2.5 1998-05-04 20:16:09 bbos Exp $
4+
# $Id: mkpropidx,v 2.6 1998-05-13 10:59:07 bbos Exp $
55
use English;
66

77

@@ -73,11 +73,14 @@ sub cleanup {
7373

7474
# Property database entries between "/*" and "*/"
7575

76+
# Adding " xref" to the class allows addlinks to allow
77+
# html2ps to insert page numbers
78+
7679
sub format_name {
7780
print OUTPUT "<td>";
7881
foreach $name (split(' ', $_[0])) {
7982
$name = cleanup($name);
80-
print OUTPUT "<span class=\"propinst-" . $name . "\">'" . $name . "'<\/span>\n";
83+
print OUTPUT "<span class=\"propinst-" . $name . " xref\">'" . $name . "'<\/span>\n";
8184
}
8285
}
8386

@@ -87,9 +90,9 @@ sub format_val {
8790
$value = $_[0];
8891
$value =~ s/^[ \t\n]+//gs;
8992
$value =~ s/[ \t\n]+$//gs;
90-
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1 noxref\">\&lt\;\1\&gt\;<\/span>/sgi;
91-
$value =~ s/\<\'(.+?)\'\>/<span class=\"propinst-\1 noxref\">\'\1\'<\/span>/sgi;
92-
$value =~ s/inherit/<span class=\"value-inst-inherit noxref\">inherit<\/span>/g;
93+
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1\">\&lt\;\1\&gt\;<\/span>/sgi;
94+
$value =~ s/\<\'(.+?)\'\>/<span class=\"propinst-\1\">\'\1\'<\/span>/sgi;
95+
$value =~ s/inherit/<span class=\"value-inst-inherit\">inherit<\/span>/g;
9396
print OUTPUT "<td>$value\n";
9497
}
9598

css2/bin/addlinks

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# Arnaud Le Hors - lehors@w3.org
1313
# Modifications by Bert Bos <bert@w3.org>
14-
# $Id: addlinks,v 2.5 1998-05-04 20:16:00 bbos Exp $
14+
# $Id: addlinks,v 2.6 1998-05-13 10:58:55 bbos Exp $
1515

1616
use DB_File;
1717
use Getopt::Std;
@@ -50,9 +50,9 @@ sub gen_anch {
5050
my ($key, $stag, $content, $etag, $xrefon) = @_;
5151
my $anch = $anchors{$key};
5252
# Make html2ps add page numbers if $xrefon is true,
53-
# unless there is an explicit "noxref" specified on the element.
53+
# or if there is an explicit "xref" specified on the element.
5454
if ($xrefon) {$class = "";} else {$class = " class=\"noxref\"";}
55-
if ($stag =~ /\bnoxref\b/) {$class = " class=\"noxref\"";}
55+
if ($stag =~ /\bxref\b/) {$class = "";}
5656
if (! defined $anch) {
5757
warn "$PROG: index $_[0] not found\n";
5858
$anch = "";

css2/bin/mkdescidx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/local/bin/perl
22
# Index of descriptor names.
33
# Arnaud Le Hors lehors@w3.org/Ian Jacobs ij@w3.org
4-
# $Id: mkdescidx,v 2.1 1998-05-04 20:16:04 bbos Exp $
4+
# $Id: mkdescidx,v 2.2 1998-05-13 10:59:02 bbos Exp $
55
use English;
66

77

@@ -75,8 +75,7 @@ sub cleanup {
7575

7676
sub format_name {
7777
$name = cleanup($_[0]);
78-
# print OUTPUT "<td><span class=\"descinst-" . $name . ", xref\">'" . $name . "'<\/span>\n";
79-
print OUTPUT "<td><span class=\"descinst-" . $name . "\">'" . $name . "'<\/span>\n";
78+
print OUTPUT "<td><span class=\"descinst-" . $name . " xref\">'" . $name . "'<\/span>\n";
8079
}
8180

8281

@@ -86,8 +85,8 @@ sub format_val {
8685
$value = $_[0];
8786
$value =~ s/^[ \t\n]+//gs;
8887
$value =~ s/[ \t\n]+$//gs;
89-
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1 noxref\">\&lt\;\1\&gt\;<\/span>/sgi;
90-
$value =~ s/\<\'(.+?)\'\>/<span class=\"descinst-\1 noxref\">\'\1\'<\/span>/sgi;
88+
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1\">\&lt\;\1\&gt\;<\/span>/sgi;
89+
$value =~ s/\<\'(.+?)\'\>/<span class=\"descinst-\1\">\'\1\'<\/span>/sgi;
9190
print OUTPUT "<td>$value\n";
9291
}
9392

css2/bin/mkpropidx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/local/bin/perl
22
# Index of property names.
33
# Arnaud Le Hors lehors@w3.org/Ian Jacobs ij@w3.org
4-
# $Id: mkpropidx,v 2.5 1998-05-04 20:16:09 bbos Exp $
4+
# $Id: mkpropidx,v 2.6 1998-05-13 10:59:07 bbos Exp $
55
use English;
66

77

@@ -73,11 +73,14 @@ sub cleanup {
7373

7474
# Property database entries between "/*" and "*/"
7575

76+
# Adding " xref" to the class allows addlinks to allow
77+
# html2ps to insert page numbers
78+
7679
sub format_name {
7780
print OUTPUT "<td>";
7881
foreach $name (split(' ', $_[0])) {
7982
$name = cleanup($name);
80-
print OUTPUT "<span class=\"propinst-" . $name . "\">'" . $name . "'<\/span>\n";
83+
print OUTPUT "<span class=\"propinst-" . $name . " xref\">'" . $name . "'<\/span>\n";
8184
}
8285
}
8386

@@ -87,9 +90,9 @@ sub format_val {
8790
$value = $_[0];
8891
$value =~ s/^[ \t\n]+//gs;
8992
$value =~ s/[ \t\n]+$//gs;
90-
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1 noxref\">\&lt\;\1\&gt\;<\/span>/sgi;
91-
$value =~ s/\<\'(.+?)\'\>/<span class=\"propinst-\1 noxref\">\'\1\'<\/span>/sgi;
92-
$value =~ s/inherit/<span class=\"value-inst-inherit noxref\">inherit<\/span>/g;
93+
$value =~ s/\<([^']+?)\>/<span class=\"value-inst-\1\">\&lt\;\1\&gt\;<\/span>/sgi;
94+
$value =~ s/\<\'(.+?)\'\>/<span class=\"propinst-\1\">\'\1\'<\/span>/sgi;
95+
$value =~ s/inherit/<span class=\"value-inst-inherit\">inherit<\/span>/g;
9396
print OUTPUT "<td>$value\n";
9497
}
9598

0 commit comments

Comments
 (0)