diff options
author | jfieber <jfieber@FreeBSD.org> | 1996-05-15 17:05:17 +0000 |
---|---|---|
committer | jfieber <jfieber@FreeBSD.org> | 1996-05-15 17:05:17 +0000 |
commit | 54adaeb6086211a4bc003e1e733a802c6b51a475 (patch) | |
tree | 14cff10bdcb7a80753354513b994cdbadfcb462f | |
parent | 1b38972b73c86fc36298f9cde6ae0ea45ad5c930 (diff) | |
download | FreeBSD-src-54adaeb6086211a4bc003e1e733a802c6b51a475.zip FreeBSD-src-54adaeb6086211a4bc003e1e733a802c6b51a475.tar.gz |
Fix a few HTML 2.0 violations.
-rw-r--r-- | share/sgml/FreeBSD/rep/html.mapping | 10 | ||||
-rwxr-xr-x | usr.bin/sgmlfmt/sgmlfmt.pl | 15 |
2 files changed, 16 insertions, 9 deletions
diff --git a/share/sgml/FreeBSD/rep/html.mapping b/share/sgml/FreeBSD/rep/html.mapping index 6dfd91b..b19b4bb 100644 --- a/share/sgml/FreeBSD/rep/html.mapping +++ b/share/sgml/FreeBSD/rep/html.mapping @@ -66,8 +66,8 @@ <comment> + "<h4>Comment</h4>" + </comment> -<abstract> + "<p><hr><em>" -</abstract> "</em><hr></p>" + +<abstract> + "<hr><p><em>" +</abstract> "</em></p><hr>" + <appendix> + "<h2>Appendix</h2>" + </appendix> @@ -189,8 +189,10 @@ <biblio> + "<BIBLIO STYLE=\"[STYLE]\" FILES=\"[FILES]\">" + </biblio> -<code> + "<hr>\n<pre>" + -</code> + "</pre>\n<hr>" + +<code> + "<pre>\n" + +</code> + "\n</pre>" + +% <code> + "<pre>\n<hr>" + +% </code> + "<hr>\n</pre>" + <verb> + "<pre>" + </verb> + "</pre>" + diff --git a/usr.bin/sgmlfmt/sgmlfmt.pl b/usr.bin/sgmlfmt/sgmlfmt.pl index e2f0cc9..8f6fbac 100755 --- a/usr.bin/sgmlfmt/sgmlfmt.pl +++ b/usr.bin/sgmlfmt/sgmlfmt.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: sgmlfmt.pl,v 1.8 1995/10/07 22:28:34 jfieber Exp $ +# $Id: sgmlfmt.pl,v 1.9 1996/03/26 13:26:53 jfieber Exp $ # Format an sgml document tagged according to the linuxdoc DTD. # by John Fieber <jfieber@freebsd.org> for the FreeBSD documentation @@ -44,6 +44,7 @@ else { # Locate the DTD, an SGML declaration, and the replacement files # +$doctype = "<!DOCTYPE html PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"; $dtdbase = "$sgmldir/FreeBSD"; $dtd = "$dtdbase/dtd/linuxdoc"; if (-f "$dtd.dec") { @@ -63,6 +64,7 @@ sub usage { print "sgmlfmt -f <format> [-i <namea> ...] [-links] [-ssi] file\n"; print "where <format> is one of: html, latex, ascii, nroff\n"; } + # # Look for the file specified on the command line # @@ -324,7 +326,7 @@ sub html2html { push(@scs, $sc); open(tocfile, ">${fileroot}_toc.html"); - print tocfile "<HTML>\n"; + print tocfile "$doctype\n<HTML>\n"; while (<$infile>) { # change `<' and `>' to `<' and `>' in <pre></pre> @@ -350,7 +352,7 @@ sub html2html { print tocfile "<H1>$st_header[0]</H1>\n"; $header[$st_ol[$sc]] = - "<HTML>\n<HEAD>\n<TITLE>$st_header[0]</TITLE>\n" . + "$doctype\n<HTML>\n<HEAD>\n<TITLE>$st_header[0]</TITLE>\n" . "</HEAD>\n<BODY>\n"; if ($opt_ssi) { # Server Side Include hook $header[$st_ol[$sc]] .= @@ -383,7 +385,7 @@ sub html2html { # set up headers and footers if ($st_sl[$sc] > 0 && $st_sl[$sc] <= $maxlevel) { $header[$st_ol[$sc]] = - "<HTML>\n<HEAD>\n<TITLE>$_</TITLE>\n</HEAD>\n<BODY>\n"; + "$doctype\n<HTML>\n<HEAD>\n<TITLE>$_</TITLE>\n</HEAD>\n<BODY>\n"; if ($opt_ssi) { # Server Side Include hook $header[$st_ol[$sc]] .= "<!--#include virtual=\"./$fileroot.hdr$st_ol[$sc]\" -->"; @@ -436,7 +438,7 @@ sub html2html { $part = 0; last tagsw; } - print tocfile "</A></DD>\n"; + print tocfile "</A>\n"; $i = $st_ol[$sc]; @@ -503,6 +505,9 @@ sub html2html { # parent file(s). if ($st_sl[$lsc] > $st_sl[$sc + 1]) { print tocfile "</DL>\n"; + if ($st_sl[$lsc] > 1) { + print tocfile "</DD>\n"; + } $i = $st_ol[$lsc] - 1 - ($st_sl[$lsc] == $st_ol[$lsc]); for (; $i >= $st_pl[$lsc]; $i--) { $text[$i] .= "</DL>\n"; |