<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12054</bug_id>
          
          <creation_ts>2011-02-13 19:19:42 +0000</creation_ts>
          <short_desc>clearly state that there must be only one character encoding declaration in a document</short_desc>
          <delta_ts>2011-08-04 05:16:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>http://bugzilla.validator.nu/show_bug.cgi?id=589</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael[tm] Smith">mike</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>yuhongbao_386</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45452</commentid>
    <comment_count>0</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-02-13 19:19:42 +0000</bug_when>
    <thetext>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.

The relevant document-conformance requirements that the spec does normatively state are:

  A. &quot;There must not be more than one meta element with a charset attribute per document.&quot;

  B. &quot;If the document contains a meta element with an http-equiv attribute in the Encoding declaration state, then the document must not contain a meta element with the charset attribute present.&quot;

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

Suggested fix:

I do see that the definition of &quot;character encoding declaration&quot; includes a bulleted list prefixed with &quot;The following restrictions apply to character encoding declarations&quot;, and an items in that list that reads, &quot;There can only be one character encoding declaration in the document.&quot;

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? Or if not, could it please be made into one? e.g., &quot;There must be only one character encoding declaration in the document.&quot;

If the spec clearly states &quot;There must be only one character encoding declaration in the document&quot; somewhere, then there would be no need for either statement A or B above, and they could just be removed, and then Problems One and Two above go away also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46424</commentid>
    <comment_count>1</comment_count>
    <who name="Yuhong Bao">yuhongbao_386</who>
    <bug_when>2011-03-06 06:54:51 +0000</bug_when>
    <thetext>Yea, the Slashdot redesign once had such an error:
http://meta.slashdot.org/comments.pl?sid=1965970&amp;cid=35003738</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47966</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-05-04 18:16:14 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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: 

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

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

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

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

&gt; That is, it would
&gt; seem to require that even if a meta element with a charset attribute occurs in
&gt; document order before a meta element with an http-equiv attribute in the
&gt; Encoding declaration state, then the meta element with a charset attribute
&gt; 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&apos;t say the doc is conforming.

I&apos;ve tried to clarify it, though.

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

It isn&apos;t. I&apos;ve tried to clarify it.


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

That would prevent the XML character encoding declaration from co-existing with a &lt;meta charset&gt; character encoding declaration, which is explicitly allowed to ease migration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47967</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-05-04 18:19:12 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6061.
Check-in comment: Try to clarify some requirements for the validator.
http://html5.org/tools/web-apps-tracker?from=6060&amp;to=6061</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53664</commentid>
    <comment_count>4</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:16:08 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>