This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3385 - xmlns in html tag is not mandatory
Summary: xmlns in html tag is not mandatory
Status: RESOLVED DUPLICATE of bug 68
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: 0.7.3
Hardware: PC Windows XP
: P2 normal
Target Milestone: 1.0
Assignee: Terje Bless
QA Contact: qa-dev tracking
Keywords: notInDTD
Depends on:
Reported: 2006-06-23 18:37 UTC by Moo
Modified: 2006-12-19 16:03 UTC (History)
1 user (show)

See Also:


Description Moo 2006-06-23 18:37:06 UTC
I validated a XHTML 1.1 document.
The html tag was a plain tag which looked like this;

But as far as I know, the standard does require the xmlns attribute. Yet the validator validates the document as correct XHTML 1.1 even though the mandatory xmlns attribute was not present.

In my browser my document didnt work until I changed it to ths;
 <html xmlns="" xml:lang="en" lang="en">
Comment 1 Olivier Thereaux 2006-10-31 07:09:05 UTC
The spec indeed requires a strictly conforming document to have the xmlns attribute for the html element

However, it looks like the DTD (the grammar published with the standard, and used to validate) does not include any such requirement. 

I'll ask the spec authors whether this was a mistake or if the omission in the DTD was on purpose.
Comment 2 Olivier Thereaux 2006-11-06 00:27:59 UTC
As checked with the HTML working group, the presence of the xmlns attribute for the html element is something that they had in the conformance criteria, but could not enforce through the DTD.

This is not as such an issue of validation, but should be considered as an extra check as we make the validator evolve toward being a conformance checker.

tagged notInDTD
Comment 3 Olivier Thereaux 2006-11-07 06:37:56 UTC

*** This bug has been marked as a duplicate of bug 68 ***
Comment 4 Martin Kliehm 2006-12-19 16:03:10 UTC
In XHTML 1.1, the XHTML namespace is required to be the fixed value "", but it is also allowed to expand the namespace:

<html xmlns=""
  xmlns:wairole= " GUIRoleTaxonomy#"

In the xmlns attribute is set to #FIXED with the value "":

<!ENTITY % XHTML.xmlns.attrib.prefixed
     "xmlns:%XHTML.prefix;  %URI.datatype;   #FIXED '%XHTML.xmlns;'"

But it is allowed to extend the namespaces via %XHTML.xmlns.extra.attrib - that's the "X" in "XHTML".