[svn r5770] HTML 4.01 compliance fixing

This commit is contained in:
sb476 2004-04-21 15:18:29 +02:00
parent 755f31ab30
commit bd3a5a4f4b

View File

@ -28,23 +28,23 @@ unless ($ARGV[0]) {
open (CSV, "< $ARGV[0]");
# Start writing index file
open IDXALL, ">..\/indxal.htm" or die $!;
print IDXALL << "END";
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
open INDXAL, ">..\/indxal.htm" or die $!;
print INDXAL << "END";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!-- *** This file is auto-generated by $progname - edit cavetab2.csv instead -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Loser Plateau area : Cave description index</title>
<link rel="stylesheet" type="text/css" href="css/main2.css" />
<link rel="stylesheet" type="text/css" href="css/main2.css">
</head>
<body>
<h1>Kataster Gruppe 1623:<br>Loser Augst-Eck - INDEX</h1>
<!-- <dl compact> -->
<table border=0 frame=0>
<table border="0" frame="void">
END
<CSV>; # starting to read in csv file, eat header line
@ -64,20 +64,20 @@ while (<CSV>) {
}
# Finish writing index file
print IDXALL << "END";
print INDXAL << "END";
</table>
<!--</dl>-->
<hr>
<!-- LINKS -->
<hr>
<p>
<img alt="&gt;" src="../icons/lists/0.png">
Back to <a href="../index.htm">CUCC Home page</a><br>
<img alt="&gt;" src="../icons/lists/0.png">
Back to <a href="index.htm">Expedition Intro page</a><br>
<img alt="&gt;" src="../icons/lists/0.png">
<b>Main Indices:</b><br>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Main Indices:</h3>
<p>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="infodx.htm"><b>Index</b> to Expo</a> information pages<br>
<img alt="---&gt;" src="../icons/lists/1.png">
@ -85,29 +85,30 @@ Back to <a href="index.htm">Expedition Intro page</a><br>
<img alt="---&gt;" src="../icons/lists/1.png">
List of (links to) <a href="pubs.htm">published reports and logbooks</a><br>
<img alt="&gt;" src="../icons/lists/0.png">
<b>Pictures:</b><br>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Pictures:</h3>
<p>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="gall0.htm">Text only Index</a><br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="gallery/0.htm">Index pages (with thumbnails)</a><br>
<img alt="&gt;" src="../icons/lists/0.png">
Other info:<br>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Other info:</h3>
<p>
<img alt="---&gt;" src="../icons/lists/1.png">
Table of <a href="folk/index.htm">members of CUCC expeditions</a> 1976-99<br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="others/index.htm">Other groups</a> who have worked in the area.<br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="1626/index.htm">Adjacent area 1626</a>
<!-- /LINKS -->
</body>
</html>
END
close IDXALL;
close INDXAL;
print "Information: Done\n";
# Process a line of the CSV file
@ -150,31 +151,31 @@ sub do_this_line {
if ($_[1] eq "cave") {
my $e = $ents;
$e =~ s/ +/&nbsp;/g;
print IDXALL "<tr><td><a name=\"$number\">$kat_num $other_number";
print INDXAL "<tr><td><a name=\"$number\">$kat_num $other_number";
if ($e) {
print IDXALL "<small> - $e</small>";
print INDXAL "<small> - $e</small>";
}
print IDXALL "</a></td><td>";
print INDXAL "</a></td><td>";
if ($file) {
print IDXALL "<a href=\"$file\">";
print INDXAL "<a href=\"$file\">";
} elsif ($linkfile) {
print IDXALL "<a href=\"$linkfile\">";
print INDXAL "<a href=\"$linkfile\">";
}
if ($name) {
print IDXALL $name;
print INDXAL $name;
} else {
print IDXALL "?";
print INDXAL "?";
}
if ($unofficial_name) {
print IDXALL " ($unofficial_name)";
print INDXAL " ($unofficial_name)";
}
if ($file or $linkfile) {
print IDXALL "</a>";
print INDXAL "</a>";
}
if ($comment) {
print IDXALL " - $comment";
print INDXAL " - $comment";
}
print IDXALL "</tr>\n";
print INDXAL "</td></tr>\n";
}
# If the cave does not have a filename allocated, but does have multiple entrances, keep going through the CSV file until we are at the last entrance, before we return
@ -210,11 +211,12 @@ sub do_this_line {
# Open the file and start writing to it
open FILE, "> $file" or die $!;
print FILE << "END";
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- *** This file is auto-generated by $progname - edit cavetab2.csv instead -->
<html lang=en>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="$toroot/css/main2.css">
END
@ -237,8 +239,8 @@ END
print FILE "$header\n";
}
print FILE "<table border=0 width=100%>\n";
print FILE "<tr><th align=left><font size=+2>";
print FILE "<table border=\"0\" width=\"100%\">\n";
print FILE "<tr><th align=\"left\"><font size=\"+2\">";
if ($kat_num) {
print FILE "$kat_num";
}
@ -249,13 +251,13 @@ END
print FILE " $other_number";
}
print FILE "</font></th>";
print FILE "<th align=center><font size=+2>$name";
print FILE "<th align=\"center\"><font size=\"+2\">$name";
if ($unofficial_name) {
print FILE " ($unofficial_name)";
}
print FILE "</font></th>";
if ($kat_status) {
print FILE "<th align=right><font size=+2>$kat_status</font></th>";
print FILE "<th align=\"right\"><font size=\"+2\">$kat_status</font></th>";
}
print FILE "</tr>\n</table>\n</center>";
@ -343,71 +345,70 @@ END
print FILE "\n\n<p><b>Survex file:</b> $survex_file";
}
print FILE "\n<hr>\n\n<!-- LINKS -->";
print FILE "\n\n<!-- LINKS -->\n<hr>\n<p>";
if ($footer) {
print FILE "\n<p>$footer";
print FILE "$footer\n<p>";
}
# Find the area the cave is in, and add appropriate links
if ($area =~ /(1a|1b|1c|1d)/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/plateau\/index.htm#$number\">Plateau area index and description</a><br>";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$number\">Plateau area index and description</a><br>";
}
if ($area =~ /(2a|2b)/) {
# we repeat this each time due to cave 39
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/smkridge\/index.htm#$number\">Schwarzmooskogel ridge area index and description</a><br>";
print FILE "<a href=\"$toroot\/smkridge\/index.htm#$number\">Schwarzmooskogel ridge area index and description</a><br>";
}
if ($area =~ /3/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/br-alm\/index.htm#$number\">Br&auml;uning Alm area index and description</a><br>";
}
if ($area =~ /4/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/kratzer\/index.htm#$number\">Kratzer valley index and description</a><br>";
}
if ($area =~ /5/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/wilden\/index.htm#$number\">Schwarzmoos-Wildensee area index and description</a><br>";
print FILE "<a href=\"$toroot\/wilden\/index.htm#$number\">Schwarzmoos-Wildensee area index and description</a><br>";
}
if ($area =~ /6/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/plateau\/index.htm#$number\">Far plateau area index and description</a><br>";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$number\">Far plateau area index and description</a><br>";
}
if ($area =~ /7/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/egglgrub\/index.htm#$number\">Egglgrube area index and description</a><br>";
print FILE "<a href=\"$toroot\/egglgrub\/index.htm#$number\">Egglgrube area index and description</a><br>";
}
if ($area =~ /(8a|8b|8c|8d)/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/loser\/index.htm#$number\">Loser/Augst See area index and description</a><br>";
print FILE "<a href=\"$toroot\/loser\/index.htm#$number\">Loser/Augst See area index and description</a><br>";
}
if ($area =~ /9/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/gschwand\/index.htm#$number\">Gschwandt area index and description</a><br>";
print FILE "<a href=\"$toroot\/gschwand\/index.htm#$number\">Gschwandt area index and description</a><br>";
}
if ($area =~ /10/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/aaussee\/index.htm#$number\">N & NE shore of Altauseer See</a><br>";
print FILE "<a href=\"$toroot\/aaussee\/index.htm#$number\">N & NE shore of Altauseer See</a><br>";
}
if ($area =~ /11/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/augstb\/index.htm#$number\">Augstbach area index and description</a><br>";
print FILE "<a href=\"$toroot\/augstb\/index.htm#$number\">Augstbach area index and description</a><br>";
}
unless ($area) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"javascript:history.back(1)\">Go Back (Javascript)</a><br>"; # ACCK! ACCK! Evil JavaScript!
print FILE "<a href=\"javascript:history.back(1)\">Go Back (Javascript)</a><br>"; # ACCK! ACCK! Evil JavaScript!
}
# Finish writing to file
print FILE << "END";
<img alt="&gt;" src="$toroot/../icons/lists/0.png">
<a href="$toroot/indxal.htm#$number">Full Index</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png">
<a href="$toroot/areas.htm">Other Areas</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png">
<a href="$toroot/index.htm">Back to Expedition Intro page</a>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/indxal.htm#$number">Full Index</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/areas.htm">Other Areas</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/index.htm">Back to Expedition Intro page</a>
<!-- /LINKS -->
</body>
</html>
@ -548,8 +549,8 @@ sub multi_ents {
my $other_number_no_brackets = $_[3];
my $toroot = $_[4];
print FILE "\n\n<menu>";
print FILE "\n<p><b>Entrances:</b>\n<br>";
print FILE "\n\n<p><b>Entrances:</b>";
print FILE "\n<menu>";
my $e_mult_ents;
# Process each entrance
@ -563,7 +564,7 @@ sub multi_ents {
$eother_number = "($eother_number)"; # wrap it in brackets, so it doesn't appear to be official
}
print FILE "\n\n<li>";
print FILE "\n<li>";
if ($elinkfile) { # this is a link to another cave - add link to entrance into cave file but don't generate another file for the entrance
print FILE "<a href=\"$toroot\/$elinkfile\">$eents $eother_number</a> ";
@ -583,7 +584,7 @@ sub multi_ents {
$e_mult_ents = $emult_ents;
} while ($e_mult_ents ne "last entrance");
print FILE "\n\n</menu>";
print FILE "\n</menu>";
}
# Usage