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
URL:
Whiteboard:
Keywords: notInDTD
Depends on:
Blocks:
 
Reported: 2006-06-23 18:37 UTC by Moo
Modified: 2006-12-19 16:03 UTC (History)
1 user (show)

See Also:


Attachments

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;
 <html>

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="http://www.w3.org/1999/xhtml" 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
http://www.w3.org/TR/xhtml11/conformance.html#strict

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 "http://www.w3.org/1999/xhtml", but it is also allowed to expand the namespace:

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:wairole= "http://www.w3.org/2005/01/wai-rdf/ GUIRoleTaxonomy#"
  xmlns:x2="http://www.w3.org/2002/06/xhtml2"
  xmlns:aaa="http://www.w3.org/2005/07/aaa">

In http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-qname-1.mod the xmlns attribute is set to #FIXED with the value "http://www.w3.org/1999/xhtml":

<!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".