summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--htdocs/config/types.conf27
-rwxr-xr-xhttpd/cgi-bin/check7
2 files changed, 30 insertions, 4 deletions
diff --git a/htdocs/config/types.conf b/htdocs/config/types.conf
index bd506ce..57497fa 100644
--- a/htdocs/config/types.conf
+++ b/htdocs/config/types.conf
@@ -1,7 +1,7 @@
#
# Main Document Type Database for the W3C Markup Validation Service.
#
-# $Id: types.conf,v 1.27 2007-04-02 06:03:44 ot Exp $
+# $Id: types.conf,v 1.28 2007-04-04 10:26:01 ot Exp $
#
# Maintains all information for each of the document types we support.
# See 'perldoc Config::General' for the syntax, and be aware that the
@@ -250,6 +250,7 @@
PubID = -//W3C//DTD XHTML 1.0 Strict//EN
SysID = http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 1 # per http://www.w3.org/TR/xhtml1/#normative
Parse Mode = XML
<Types>
Allowed = text/html application/xhtml+xml
@@ -271,6 +272,7 @@
PubID = -//W3C//DTD XHTML 1.0 Transitional//EN
SysID = http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 1 # per http://www.w3.org/TR/xhtml1/#normative
Parse Mode = XML
<Types>
Allowed = text/html application/xhtml+xml
@@ -292,6 +294,7 @@
PubID = -//W3C//DTD XHTML 1.0 Frameset//EN
SysID = http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-frameset.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 1 # per http://www.w3.org/TR/xhtml1/#normative
Parse Mode = XML
<Types>
Allowed = text/html application/xhtml+xml
@@ -313,6 +316,7 @@
PubID = -//W3C//DTD XHTML Basic 1.0//EN
SysID = http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/xhtml-basic10.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 0 # per http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/#s2.1 it is unclear whether the namespace is fixed, or required
Parse Mode = XML
<Types>
Allowed = text/html application/xhtml+xml
@@ -334,6 +338,7 @@
PubID = -//W3C//DTD XHTML Basic 1.1//EN
SysID = http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 0 # per http://www.w3.org/TR/xhtml-basic/#s2.1 it is unclear whether the namespace is fixed, or required
Parse Mode = XML
<Types>
Allowed = text/html application/xhtml+xml
@@ -349,6 +354,7 @@
PubID = -//W3C//DTD XHTML-Print 1.0//EN
SysID = http://www.w3.org/MarkUp/DTD/xhtml-print10.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 0 # per http://www.w3.org/TR/xhtml-print/#s2.1 it is unclear whether the namespace is fixed, or required
Parse Mode = XML
<Types>
Allowed = application/xhtml+xml
@@ -371,6 +377,7 @@
PubID = -//W3C//DTD XHTML 1.1//EN
SysID = http://www.w3.org/TR/2001/REC-xhtml11-20010531/DTD/xhtml11-flat.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 1 # per http://www.w3.org/TR/xhtml11/conformance.html#s_conform
Parse Mode = XML
<Types>
Allowed = application/xhtml+xml
@@ -426,6 +433,7 @@
PubID = -//W3C//DTD MathML 2.0//EN
SysID = http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
Namespace = http://www.w3.org/1998/Math/MathML
+ Namespace Required = 0 # unclear per http://www.w3.org/TR/MathML2/chapter7.html#interf.namespace
Parse Mode = XML
<Types>
Allowed = application/mathml+xml
@@ -447,6 +455,7 @@
PubID = -//W3C//DTD XHTML 1.1 plus MathML 2.0//EN
SysID = http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd
Namespace = http://www.w3.org/1999/xhtml
+ Namespace Required = 0 # unclear per http://www.w3.org/TR/MathML2/chapter7.html#interf.namespace
Parse Mode = XML
<Types>
Allowed = application/xhtml+xml application/xml text/xml
@@ -461,6 +470,8 @@
PubID = -//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN
SysID = http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd
Namespace = http://www.w3.org/1999/xhtml
+ # unsure about this one. Usually xhtml-hosted languages are required to use ns, but nothing to that effect in the spec...
+ Namespace Required = 0
Parse Mode = XML
<Types>
Allowed = application/xhtml+xml application/xml text/xml
@@ -475,6 +486,9 @@
PubID = -//W3C//DTD SVG 1.0//EN
SysID = http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd
Namespace = http://www.w3.org/2000/svg
+ # per http://www.w3.org/TR/2001/REC-SVG-20010904/struct.html#NewDocumentOverview
+ # An xmlns attribute without a namespace prefix *could* be specified on an 'svg' element
+ Namespace Required = 0
Parse Mode = XML
<Types>
Allowed = image/svg+xml
@@ -494,6 +508,9 @@
PubID = -//W3C//DTD SVG 1.1//EN
SysID = http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
Namespace = http://www.w3.org/2000/svg
+ # per http://www.w3.org/TR/2003/REC-SVG11-20030114/struct.html#NewDocumentOverview
+ # An xmlns attribute without a namespace prefix *could* be specified on an 'svg' element
+ Namespace Required = 0
Parse Mode = XML
<Types>
Allowed = image/svg+xml
@@ -513,6 +530,7 @@
PubID = -//W3C//DTD SVG 1.1 Tiny//EN
SysID = http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd
Namespace = http://www.w3.org/2000/svg
+ Namespace Required = 0 # no mention in http://www.w3.org/TR/2003/REC-SVGMobile-20030114/#sec-structure
Parse Mode = XML
<Types>
Allowed = image/svg+xml
@@ -532,6 +550,7 @@
PubID = -//W3C//DTD SVG 1.1 Basic//EN
SysID = http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd
Namespace = http://www.w3.org/2000/svg
+ Namespace Required = 0 # no mention in http://www.w3.org/TR/2003/REC-SVGMobile-20030114/#sec-structure
Parse Mode = XML
<Types>
Allowed = image/svg+xml
@@ -545,6 +564,8 @@
Info URL = http://www.w3.org/TR/REC-smil/
PubID = -//W3C//DTD SMIL 1.0//EN
SysID = http://www.w3.org/TR/REC-smil/SMIL10.dtd
+ Namespace = http://www.w3.org/TR/REC-smil
+ Namespace Required = 0 # apparently not, per http://www.w3.org/TR/REC-smil/#smil
Parse Mode = XML
<Types>
Allowed = application/smil+xml application/smil
@@ -559,6 +580,7 @@
PubID = -//W3C//DTD SMIL 2.0//EN
SysID = http://www.w3.org/2001/SMIL20/SMIL20.dtd
Namespace = http://www.w3.org/2001/SMIL20/Language
+ Namespace Required = 1 # yes, per http://www.w3.org/TR/2005/REC-SMIL2-20050107/smil20-profile.html#SMILProfileNS-ConformingDocuments
Parse Mode = XML
<Types>
Allowed = application/smil+xml application/smil
@@ -573,6 +595,7 @@
PubID = -//W3C//DTD SMIL 2.1//EN
SysID = http://www.w3.org/2005/SMIL21/SMIL21.dtd
Namespace = http://www.w3.org/2005/SMIL21/Language
+ Namespace Required = 1 # yes, per http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil21-profile.html#SMILProfileNS-ConformingDocuments
Parse Mode = XML
<Types>
Allowed = application/smil+xml application/smil
@@ -587,6 +610,7 @@
PubID = -//W3C//DTD SMIL 2.1 Mobile//EN
SysID = http://www.w3.org/2005/SMIL21/SMIL21Mobile.dtd
Namespace = http://www.w3.org/2005/SMIL21/Mobile
+ Namespace Required = 1 # yes, per http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil21-mobile-profile.html#q6
Parse Mode = XML
<Types>
Allowed = application/smil+xml application/smil
@@ -601,6 +625,7 @@
PubID = -//W3C//DTD SMIL 2.1 Extended Mobile//EN
SysID = http://www.w3.org/2005/SMIL21/SMIL21ExtendedMobile.dtd
Namespace = http://www.w3.org/2005/SMIL21/ExtendedMobile
+ Namespace Required = 1 # yes, per http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil21-extended-mobile-profile.html#q5
Parse Mode = XML
<Types>
Allowed = application/smil+xml application/smil
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index afd79ef..1fd7358 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.496 2007-04-04 09:53:16 ville Exp $
+# $Id: check,v 1.497 2007-04-04 10:26:01 ot Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.496 $;
+ $VERSION = q$Revision: 1.497 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -2233,7 +2233,8 @@ sub W3C::Validator::SAXHandler::start_element
}
}
- if ($has_xmlns == FALSE){
+ if (($has_xmlns == FALSE) and ($CFG->{Types}->{$self->{_file}->{DOCTYPE}}->{"Namespace Required"} eq TRUE )){
+ # whine if the root xmlns attribute is noted as required by spec, but not present
my $err;
my $location = $self->{_parser}->get_location();
$err->{src} = '...'; # do this with show_open_entities()?