[svn r5775] Now with Extra XHTML 1.0 Strictness

This commit is contained in:
sb476 2004-04-21 23:49:22 +02:00
parent 589379ad72
commit 1990bac00e

View File

@ -4,7 +4,6 @@ use File::Path;
use Getopt::Long;
# no_info col is redundant. FIXME
# WTF is dl compact?
((my $progname = $0) =~ s/^.*(\/|\\)//ig); # basename $0
@ -30,19 +29,18 @@ open (CSV, "< $ARGV[0]");
# Start writing index file
open INDXAL, ">..\/indxal.htm" or die $!;
print INDXAL << "END";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- *** This file is auto-generated by $progname - edit cavetab2.csv instead -->
<html lang="en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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>
<h1>Kataster Gruppe 1623:<br />Loser Augst-Eck - INDEX</h1>
<table border="0" frame="void">
END
@ -68,36 +66,30 @@ print INDXAL << "END";
</table>
<!-- 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></p>
<hr /><ul id="links">
<li>Back to <a href="../index.htm">CUCC Home page</a></li>
<li>Back to <a href="index.htm">Expedition Intro page</a></li>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Main Indices:</h3>
<li>
<h3>Main Indices:</h3>
<ul><li><a href="infodx.htm"><b>Index</b> to Expo</a> information pages</li>
<li><a href="areas.htm">Description of CUCC's area</a> and split to subareas</li>
<li>List of (links to) <a href="pubs.htm">published reports and logbooks</a></li></ul>
</li>
<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">
<a href="areas.htm">Description of CUCC's area</a> and split to subareas<br>
<img alt="---&gt;" src="../icons/lists/1.png">
List of (links to) <a href="pubs.htm">published reports and logbooks</a></p>
<li>
<h3>Pictures:</h3>
<ul><li><a href="gall0.htm">Text only Index</a></li>
<li><a href="gallery/0.htm">Index pages (with thumbnails)</a></li></ul>
</li>
<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></p>
<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></p>
<li>
<h3>Other info:</h3>
<ul><li>Table of <a href="folk/index.htm">members of CUCC expeditions</a> 1976-99</li>
<li><a href="others/index.htm">Other groups</a> who have worked in the area.</li>
<li><a href="1626/index.htm">Adjacent area 1626</a></li></ul>
</li>
</ul>
<!-- /LINKS -->
</body>
@ -209,13 +201,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.01 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- *** This file is auto-generated by $progname - edit cavetab2.csv instead -->
<html lang="en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="$toroot/css/main2.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="$toroot/css/main2.css" />
END
if ($kat_num) {
@ -230,15 +221,14 @@ END
<body>
<center>
END
if ($header) {
print FILE "$header\n\n";
}
print FILE "<table border=\"0\" width=\"100%\">\n";
print FILE "<tr><th align=\"left\"><font size=\"+2\">";
print FILE "<table id=\"cavepage\">\n";
print FILE "<tr><th id=\"kat_no\">";
if ($kat_num) {
print FILE "$kat_num";
}
@ -246,18 +236,17 @@ END
print FILE " - $ents";
}
if ($other_number) {
print FILE " $other_number";
print FILE "<br />$other_number";
}
print FILE "</font></th>";
print FILE "<th align=\"center\"><font size=\"+2\">$name";
print FILE "</th><th id=\"name\">$name";
if ($unofficial_name) {
print FILE " ($unofficial_name)";
print FILE "<br />($unofficial_name)";
}
print FILE "</font></th>";
print FILE "</th>";
if ($kat_status) {
print FILE "<th align=\"right\"><font size=\"+2\">$kat_status</font></th>";
print FILE "<th id=\"status\">$kat_status</th>";
}
print FILE "</tr>\n</table>\n</center>";
print FILE "</tr>\n</table>";
if ($length or $depth or $extent) {
print FILE "\n\n<p>";
@ -344,68 +333,56 @@ END
print FILE "\n\n<p><b>Survex file:</b> $survex_file</p>";
}
print FILE "\n\n<!-- LINKS -->\n<hr>\n<p>";
if ($footer) {
print FILE "$footer</p>\n<p>";
print FILE "\n\n<p>$footer</p>";
}
print FILE "\n\n<!-- LINKS -->\n<hr /><ul id=\"links\">\n";
# Find the area the cave is in, and add appropriate links
if ($area =~ /(1a|1b|1c|1d)/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$linkid\">Plateau area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/plateau\/index.htm#$linkid\">Plateau area index and description</a></li>\n";
}
if ($area =~ /(2a|2b)/) {
# we repeat this each time due to cave 39
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/smkridge\/index.htm#$linkid\">Schwarzmooskogel ridge area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/smkridge\/index.htm#$linkid\">Schwarzmooskogel ridge area index and description</a></li>\n";
}
if ($area =~ /3/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/br-alm\/index.htm#$linkid\">Br&auml;uning Alm area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/br-alm\/index.htm#$linkid\">Br&auml;uning Alm area index and description</a></li>\n";
}
if ($area =~ /4/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/kratzer\/index.htm#$linkid\">Kratzer valley index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/kratzer\/index.htm#$linkid\">Kratzer valley index and description</a></li>\n";
}
if ($area =~ /5/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/wilden\/index.htm#$linkid\">Schwarzmoos-Wildensee area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/wilden\/index.htm#$linkid\">Schwarzmoos-Wildensee area index and description</a></li>\n";
}
if ($area =~ /6/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$linkid\">Far plateau area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/plateau\/index.htm#$linkid\">Far plateau area index and description</a></li>\n";
}
if ($area =~ /7/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/egglgrub\/index.htm#$linkid\">Egglgrube area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/egglgrub\/index.htm#$linkid\">Egglgrube area index and description</a></li>\n";
}
if ($area =~ /(8a|8b|8c|8d)/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/loser\/index.htm#$linkid\">Loser/Augst See area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/loser\/index.htm#$linkid\">Loser/Augst See area index and description</a></li>\n";
}
if ($area =~ /9/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/gschwand\/index.htm#$linkid\">Gschwandt area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/gschwand\/index.htm#$linkid\">Gschwandt area index and description</a></li>\n";
}
if ($area =~ /10/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/aaussee\/index.htm#$linkid\">N & NE shore of Altauseer See</a><br>\n";
print FILE "<li><a href=\"$toroot\/aaussee\/index.htm#$linkid\">N & NE shore of Altauseer See</a></li>\n";
}
if ($area =~ /11/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/augstb\/index.htm#$linkid\">Augstbach area index and description</a><br>\n";
print FILE "<li><a href=\"$toroot\/augstb\/index.htm#$linkid\">Augstbach area index and description</a></li>\n";
}
unless ($area) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"javascript:history.back(1)\">Go Back (Javascript)</a><br>\n"; # ACCK! ACCK! Evil JavaScript!
print FILE "<li><a href=\"javascript:history.back(1)\">Go Back (Javascript)</a></li>\n"; # 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#$linkid">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></p>
<li><a href="$toroot/indxal.htm#$linkid">Full Index</a></li>
<li><a href="$toroot/areas.htm">Other Areas</a></li>
<li><a href="$toroot/index.htm">Back to Expedition Intro page</a></li>
</ul>
<!-- /LINKS -->
</body>
@ -525,7 +502,7 @@ sub do_ent {
}
}
if ($calc_easting) {
print FILE "<br>\nLookup values for $desc data: ";
print FILE "<br />\nLookup values for $desc data: ";
print FILE "<b>Alt:</b> $calc_altitude ";
print FILE "<b>N</b>$calc_northing ";
print FILE "<b>E</b>$calc_easting ";
@ -547,8 +524,7 @@ sub multi_ents {
my $other_number_no_brackets = $_[3];
my $toroot = $_[4];
print FILE "\n\n<p><b>Entrances:</b></p>\n\n<p>";
print FILE "<ul>";
print FILE "\n\n<p><b>Entrances:</b></p>\n\n<ul>";
my $e_mult_ents;
# Process each entrance
@ -579,10 +555,11 @@ sub multi_ents {
# Process the location data for the entrance
do_ent($etag_punkt,$eother_punkt,$eexact_punkt,$egpspostsa,$egpspresa,$eeasting,$enorthing,$ealtitude,$eent_name,$efix_type,$edesc_other_punkt);
print FILE "</li>";
$e_mult_ents = $emult_ents;
} while ($e_mult_ents ne "last entrance");
print FILE "\n</ul></p>";
print FILE "\n</ul>";
}
# Usage