W3C home > Mailing lists > Public > www-validator-cvs@w3.org > December 2010

markup-validator commit: Add grouping title for HTML5 validator errors.

From: Mercurial notifier <nobody@w3.org>
Date: Tue, 14 Dec 2010 22:29:09 +0000
Message-Id: <E1PSdMr-0003el-0J@mcbain.w3.org>
To: markup-validator updates <www-validator-cvs@w3.org>
changeset:   3196:ee6e125eaa17
user:        Ville Skyttä <ville.skytta@iki.fi>
date:        Wed Dec 15 00:28:29 2010 +0200
files:       httpd/cgi-bin/check
description:
Add grouping title for HTML5 validator errors.

Not much info there for now (everything lumped in one group), but
this avoids some error log trashing.


diff -r d933a252d9bc -r ee6e125eaa17 httpd/cgi-bin/check
--- a/httpd/cgi-bin/check	Wed Dec 15 00:15:52 2010 +0200
+++ b/httpd/cgi-bin/check	Wed Dec 15 00:28:29 2010 +0200
@@ -2489,15 +2489,19 @@
                 if (!exists $Errors_bytype{$err->{num}}) {
                     $Errors_bytype{$err->{num}}->{instances} = [];
                     my $msg_text;
-                    if ($err->{num} ne 'xmlwf') {
+                    if ($err->{num} eq 'xmlwf') {
+
+                        # FIXME need a catalog of errors from XML::LibXML
+                        $msg_text = "XML Parsing Error";
+                    }
+                    elsif ($err->{num} eq 'html5') {
+                        $msg_text = "HTML5 Validator Error";
+                    }
+                    else {
                         $msg_text = $RSRC{msg}->{$err->{num}}->{original};
                         $msg_text =~ s/%1/X/;
                         $msg_text =~ s/%2/Y/;
                     }
-                    else
-                    {  ## FIXME we need a catalog of errors from our XML parser
-                        $msg_text = "XML Parsing Error";
-                    }
                     $Errors_bytype{$err->{num}}->{expl}        = $err->{expl};
                     $Errors_bytype{$err->{num}}->{generic_msg} = $msg_text;
                     $Errors_bytype{$err->{num}}->{msg}         = $err->{msg};
Received on Tuesday, 14 December 2010 22:29:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:25 GMT