<?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>1784</bug_id>
          
          <creation_ts>2005-07-20 04:09:42 +0000</creation_ts>
          <short_desc>Send warning for duplicated name attribute value</short_desc>
          <delta_ts>2007-03-29 18:50:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>0.7.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Shin Saito">shinsa</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4984</commentid>
    <comment_count>0</comment_count>
    <who name="Shin Saito">shinsa</who>
    <bug_when>2005-07-20 04:09:42 +0000</bug_when>
    <thetext>Duplicated use of an anchor name cannot be detected.
For example, it passes the HTML code below:

&lt;a name=&quot;top&quot;&gt;Anchor 1&lt;/a&gt;
&lt;a name=&quot;top&quot;&gt;Anchor 2&lt;/a&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4987</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2005-07-20 04:37:57 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Duplicated use of an anchor name cannot be detected.
&gt; For example, it passes the HTML code below:
&gt; 
&gt; &lt;a name=&quot;top&quot;&gt;Anchor 1&lt;/a&gt;
&gt; &lt;a name=&quot;top&quot;&gt;Anchor 2&lt;/a&gt;

the &quot;name&quot; attribute is of type name, which means that unlike the &quot;id&quot; attribute, the name attribute has 
no constraint of uniqueness. As a result, the above is valid, and the validator parses it as such.

In an attempt at usefulness, one could imagine that the validator could throw a warning when detecting 
a duplicate name attribute. I am changing the bug title to show this idea, and marking it as 
enhancement request.

Note that in XHTML, the name attribute is deprecated.
http://www.w3.org/TR/xhtml1/#h-4.10

 The HTML compatibility guidelines recommend to use name=&quot;foo&quot; id=&quot;foo&quot;. This recommendation is 
also a good idea for HTML4.
http://www.w3.org/TR/xhtml1/#C_8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4993</commentid>
    <comment_count>2</comment_count>
    <who name="Bj">bjoern</who>
    <bug_when>2005-07-20 11:54:02 +0000</bug_when>
    <thetext>s/warning/error since it violates HTML conformance requirements.
I&apos;ve implemented checks for this long ago in HTML Tidy...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>