summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlink <link@localhost>2001-06-23 05:33:10 +0000
committerlink <link@localhost>2001-06-23 05:33:10 +0000
commit4445522056ebb41f39de3aaf79a757b99a38fd47 (patch)
tree68262efc10a1f49e62d446bff18ac857de6cd26f
parentb98336b562c7485d7915b0872b6596552609cd19 (diff)
downloadmarkup-validator-4445522056ebb41f39de3aaf79a757b99a38fd47.zip
markup-validator-4445522056ebb41f39de3aaf79a757b99a38fd47.tar.gz
markup-validator-4445522056ebb41f39de3aaf79a757b99a38fd47.tar.bz2
Adding support for changing options and revalidating from results page.
-rwxr-xr-xhtdocs/todo.html6
-rwxr-xr-xhttpd/cgi-bin/check51
2 files changed, 50 insertions, 7 deletions
diff --git a/htdocs/todo.html b/htdocs/todo.html
index 100b2a9..508c7b9 100755
--- a/htdocs/todo.html
+++ b/htdocs/todo.html
@@ -8,7 +8,7 @@
W3C HTML Validation Service, To Do List">
<meta name="description" content="To Do List for W3C's Validation Service.">
<meta name="revision"
- content="$Id: todo.html,v 1.42 2001-06-13 23:37:09 link Exp $">
+ content="$Id: todo.html,v 1.43 2001-06-23 05:33:10 link Exp $">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000ee" vlink="#551a8b">
@@ -58,8 +58,6 @@
(or maybe just show a few lines of context for each error?)
Or add a "show source iff errors" option?
- <li> allow twiddling of options from the results page
-
<li> make lists of "most frequently validated invalid pages"
and "most frequently validated (non-W3C?) valid pages"
(need to start logging stuff first, including IPs to compare
@@ -224,7 +222,7 @@
src="http://validator.w3.org/images/vh40" height=31 width=88
align=right border=0 alt="Valid W3C HTML 4.0!"></a>
<a href="/feedback.html">Gerald Oskoboiny</A><br>
- $Date: 2001-06-13 23:37:09 $
+ $Date: 2001-06-23 05:33:10 $
</address>
</body>
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 91bbfae..01ec6f4 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -8,7 +8,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.129 2001-06-23 04:06:44 link Exp $
+# $Id: check,v 1.130 2001-06-23 05:33:10 link Exp $
#
# We need Perl 5.004.
@@ -78,9 +78,9 @@ my $element_ref = 'http://www.htmlhelp.com/reference/html40/';
#
# Strings
-$VERSION = q$Revision: 1.129 $;
+$VERSION = q$Revision: 1.130 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
-$DATE = q$Date: 2001-06-23 04:06:44 $;
+$DATE = q$Date: 2001-06-23 05:33:10 $;
$MAINTAINER = 'gerald@w3.org';
$NOTICE = ''; # "<p><strong>Note: This service will be ...</strong>";
@@ -542,6 +542,8 @@ if ($File->{Type} eq 'xml' or $File->{Type} eq 'xhtml') {
}
print ' ' x 2, qq(</ul>\n\n);
+&revalidate($q, $File);
+
if ($File->{Type} eq 'xml' or $File->{Type} eq 'xhtml') {
my $xmlvalid = ($File->{DOCTYPE} ? ' and validity' : '');
print <<"EOHD";
@@ -1472,3 +1474,46 @@ sub preparse {
return $File;
}
+
+#
+# Output HTML for the revalidate controls in validation results.
+sub revalidate {
+ my $q = shift;
+ my $File = shift;
+
+ print <<".EOF.";
+ <div id="controls">
+ <form method="get" action="/check">
+ <input type="hidden" name="uri" value="$File->{URI}">
+ <p>
+.EOF.
+ print " " x 8, '<input type="checkbox" value="" name="ss"',
+ ($q->param('ss') ? 'checked="checked"' : ''), ' />Show Source';
+ print " " x 8, '<input type="checkbox" value="" name="sp"',
+ ($q->param('sp') ? 'checked="checked"' : ''), ' />Parse Tree';
+ print " " x 8, '<input type="checkbox" value="" name="outline"',
+ ($q->param('outline') ? 'checked="checked"' : ''), ' />Outline';
+ print " " x 8, '<input type="checkbox" value="" name="noatt"',
+ ($q->param('noatt') ? 'checked="checked"' : ''), ' />...no attributes';
+ print " </p>\n <p>\n Doctype: ";
+ print $q->popup_menu(-name => 'doctype',
+ -values => [
+ 'Inline',
+ 'XHTML 1.0 Strict',
+ 'XHTML 1.0 Transitional',
+ 'XHTML 1.0 Frameset',
+ 'HTML 4.01 Strict',
+ 'HTML 4.01 Transitional',
+ 'HTML 4.01 Frameset',
+ 'HTML 3.2',
+ 'HTML 2.0',
+ ],
+ -default => $q->param('doctype'),
+ );
+ print <<".EOF.";
+ <input type="submit" value="Revalidate" />
+ </p>
+ </form>
+ </div>
+.EOF.
+}