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 68 - provide a warning when an XHTML page lacks an xmlns declaration.
Summary: provide a warning when an XHTML page lacks an xmlns declaration.
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.6.0
Hardware: All All
: P2 enhancement
Target Milestone: 0.8.0
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
URL: http://www.aaronsw.com/2002/fixedxmlns
Whiteboard:
Keywords: notInDTD
: 3385 4111 (view as bug list)
Depends on: 43 739
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-19 23:20 UTC by Aaron Swartz
Modified: 2007-08-19 21:06 UTC (History)
3 users (show)

See Also:


Attachments

Description Aaron Swartz 2002-11-19 23:20:09 UTC
The validator should provide a warning when an XHTML page lacks an xmlns
declaration.
Example: http://www.aaronsw.com/2002/fixedxmlns
Comment 1 Terje Bless 2002-11-20 13:17:03 UTC
This, as well as providing a warning for an incorrect Root Namespace for the
given DOCTYPE, is on the ephemereal mental TODO. This depends on the new config
parser and probably one or two other infrastructural pieces of code.

Setting blocker on Bug #43 and targetting 0.7.0.
Comment 2 Terje Bless 2004-09-01 16:34:59 UTC
Nominating for 0.7.0 release.
Comment 3 niq 2004-09-20 21:08:56 UTC
We need to apply rules based on MIME type.  That warning is appropriate to XML
doctypes, but not to text/html with XHTML/1.0 where a different message could be
used.
Comment 4 Terje Bless 2004-10-12 19:21:40 UTC
Won't make it for 0.7.0.
Comment 5 Olivier Thereaux 2006-11-07 06:37:56 UTC
*** Bug 3385 has been marked as a duplicate of this bug. ***
Comment 6 Olivier Thereaux 2006-11-07 07:31:51 UTC
Assigning this to me. 

This is really unchartered territory as this is not a validation issue but a conformance issue, hence it will have to be triggered by some kind of option, but this is one conformance constraint that should not be too difficult to test.
Comment 7 Olivier Thereaux 2006-11-09 06:50:07 UTC
not targeting the imminent bugfix release, but the next actual version, with an architecture that would allow us to to that kind of thing more easily, with SAX.
Comment 8 Olivier Thereaux 2007-01-03 15:11:15 UTC
*** Bug 4111 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thereaux 2007-04-02 10:47:55 UTC
Done in HEAD (soon to be 0.8.0), see:
http://qa-dev.w3.org/wmvs/HEAD/check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/xhtml1-strict-missing-xmlns.html;ss

The problem is that DTDs can either set an attribute to FIXED or REQUIRED but not both... So we had to deal with this issue differently.

Note that current CVS version shoots an error at such an issue, whether it should be a warning is unclear, but comments in e.g http://www.w3.org/QA/2007/03/validation_to_conformance.html#comments seem to show that there is no strong opposition (yet?) to marking not-validation-but-conformance issues as errors. 

Also see 
http://qa-dev.w3.org/wmvs/HEAD/dev/tests/smil20-profile-doctype.smi
for an example of document with bogus xmlns, and that is also marked as error by the current cvs HEAD.

Resolving FIXED.
Comment 10 Marjolein Katsma 2007-08-19 16:15:52 UTC
(In reply to comment #9)
> Done in HEAD (soon to be 0.8.0), see:
> http://qa-dev.w3.org/wmvs/HEAD/check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/xhtml1-strict-missing-xmlns.html;ss
> 
> The problem is that DTDs can either set an attribute to FIXED or REQUIRED but
> not both...

How is this a problem?

There seems to be a lot of confusion about - or different interpretations of - the meaning of FIXED.

I understand it like this (and I'm not alone in this):
FIXED means 1) the attribute can have only one value, and 2) the document already *has* that value by means of the FIXED value in the DTD it refers to. This implies that if a value is defined as FIXED and a document refers to a DTD that defines it like that, declaring the attribute isn't mandatory: that's (almost) the /opposite/ of REQUIRED which mandates that the attribute be declared. At the same time, it's /allowed/ to be declared, as long as it has the value as shown in the FIXED clause, and not anything different. (Which is the reason FIXED and REQUIRED cannot appear at the same time. :))

That implies:
1. there is /no need/ for a warning at all when the DTD for the declared XHTML version states this as being FIXED (rather than REQUIRED) and the document does not declare the attribute;
2. there certainly /should not/ be an error message, as the validator gives now, when the attribute is not declared: when not declared, the document already /has/ the correct namespace; and
3. there /must/ be an error message when the attribute /is/ declared but has a value /different/ than the one indicated as FIXED in the DTD

IMO the resolution of this issue has actually created a *bug* in the validator, by issuing an error message for what is not an error at all.

Since it is apparently not possible (for me, at least) to reopen this issue (or any issue?), I'll file a new bug.

(Other related issues: 800, 3385, 4475, 4495)
Comment 11 Marjolein Katsma 2007-08-19 17:00:15 UTC
(In reply to comment #10)
> 
> Since it is apparently not possible (for me, at least) to reopen this issue (or
> any issue?), I'll file a new bug.

Done: #4961 (http://www.w3.org/Bugs/Public/show_bug.cgi?id=4961)
Comment 12 Olivier Thereaux 2007-08-19 19:38:31 UTC
*** Bug 4961 has been marked as a duplicate of this bug. ***
Comment 13 Marjolein Katsma 2007-08-19 21:06:51 UTC
(In reply to comment #12)
> *** Bug 4961 has been marked as a duplicate of this bug. ***
> 

It has been closed instead, since it's obviously NOT a duplicate of this bug. Quite the opposite.