[Bug 12054] clearly state that there must be only one character encoding declaration in a document

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12054

Ian 'Hixie' Hickson <ian@hixie.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ian@hixie.ch
         Resolution|                            |FIXED

--- Comment #2 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-05-04 18:16:14 UTC ---
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the tracker issue; or you may create a tracker issue
yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: see diff given below
Rationale: 

> Problem One: There does not seem to be any clearly stated normative
> document-conformance requirement in the spec that prohibits a document from
> containing multiple meta elements with an http-equiv attribute in the Encoding
> declaration state.

"There must not be more than one meta element with any particular state in the
document at a time."

> Problem Two:  Statement B above makes it sound as if a character encoding
> declaration given by a meta element with an http-equiv attribute in the
> Encoding declaration state always takes precedence over a character encoding
> declaration given by a meta element with a charset attribute.

It doesn't talk about precedence, it's just prohibiting both from being present
at once.

> That is, it would
> seem to require that even if a meta element with a charset attribute occurs in
> document order before a meta element with an http-equiv attribute in the
> Encoding declaration state, then the meta element with a charset attribute
> should be reported as an error. Which seems wrong.

It just requires that in that case an error be reported, nothing in the spec
requires specific validator UI. You could report a completely unrelated error,
so long as you don't say the doc is conforming.

I've tried to clarify it, though.

> Suggested fix:
> 
> I do see that the definition of "character encoding declaration" includes a
> bulleted list prefixed with "The following restrictions apply to character
> encoding declarations", and an items in that list that reads, "There can only
> be one character encoding declaration in the document."
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#character-encoding-declaration
> 
> Is that meant to be a normative document-conformance requirement?

It isn't. I've tried to clarify it.


> Or if not,
> could it please be made into one? e.g., "There must be only one character
> encoding declaration in the document."

That would prevent the XML character encoding declaration from co-existing with
a <meta charset> character encoding declaration, which is explicitly allowed to
ease migration.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 4 May 2011 18:16:16 UTC