summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorot <ot@localhost>2007-04-30 16:09:09 +0000
committerot <ot@localhost>2007-04-30 16:09:09 +0000
commit194e713c9ce46383390dee3b256adac025e4e6ac (patch)
tree1e13db56cef6f05894a034417b1fd7ecae9f2e10
parent3c80e21c7de474f7ec61db51af438b5d3555a910 (diff)
downloadmarkup-validator-194e713c9ce46383390dee3b256adac025e4e6ac.zip
markup-validator-194e713c9ce46383390dee3b256adac025e4e6ac.tar.gz
markup-validator-194e713c9ce46383390dee3b256adac025e4e6ac.tar.bz2
Applying patch from http://www.w3.org/Bugs/Public/show_bug.cgi?id=800
based on ideas and code proposed by Shane McCarron.
-rwxr-xr-xhttpd/cgi-bin/check15
1 files changed, 13 insertions, 2 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index d048698..215b550 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -14,7 +14,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.513 2007-04-30 13:36:34 ot Exp $
+# $Id: check,v 1.514 2007-04-30 16:09:09 ot Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.513 $;
+ $VERSION = q$Revision: 1.514 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -2339,6 +2339,17 @@ sub W3C::Validator::SAXHandler::error
$err->{type} = $mess->{primary_message}{Severity};
$err->{msg} = $mess->{primary_message}{Text};
+ # our parser OpenSP is not quite XML-aware, or XML Namespaces Aware,
+ # so we filter out a few errors for now
+
+ if ($File->{Mode} eq 'XML') {
+ if ($err->{num} eq '108' and $err->{msg} =~ m{ "xmlns:\S+"}) {
+ # the error is about a missing xmlns: attribute definition"
+ return ; # this is not an error, 'cause we said so
+ }
+ }
+
+
# ...
$File->{'Is Valid'} = FALSE if $err->{type} eq 'E';