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 3899 - invalid attribute id for elements <style> and <html> in XHTML 1.1
Summary: invalid attribute id for elements <style> and <html> in XHTML 1.1
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: Types Registry (show other bugs)
Version: 0.7.3
Hardware: PC All
: P2 major
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 11:49 UTC by Ivo Emanuel Gonçalves
Modified: 2012-08-23 00:10 UTC (History)
1 user (show)

See Also:


Attachments
Testcase for bug; try to parse it through the validator (54.92 KB, application/xhtml+xml)
2006-11-02 14:25 UTC, Ivo Emanuel Gonçalves
Details

Description Ivo Emanuel Gonçalves 2006-10-31 11:49:16 UTC
Hello,

The Validator chokes on id="" on <style> tags and reports them as invalid.  However, in XHTML, which is what I wrote my page as, it's supposed to be valid.  It's on the spec.  http://www.w3.org/TR/xhtml1/#C_13

Internal style sheets are supposed to be pointed in the markup, but with the validator pointing it out as an error, it's not a good thing for XHTML use.

Is there a way to attach a test case?  I'll do so if possible.
Comment 1 Olivier Thereaux 2006-11-01 00:41:53 UTC
The validator accepts the id attribute for style elements just fine. See e.g the example given in the specification:
http://www.w3.org/TR/xhtml1/#C_14

If the validator invalidated your usage of id, it probably is because you used an incorrect value. See http://www.w3.org/TR/html4/types.html#type-id

I am closing this bug as invalid. If you have a test case showing the contrary, please attach it using the "create a new attachment" feature of bugzilla, or the URL: field.
Comment 2 Ivo Emanuel Gonçalves 2006-11-02 14:25:22 UTC
Created attachment 442 [details]
Testcase for bug; try to parse it through the validator

A testcase was attached, and the bug re-opened.  And here's a screenshot too, http://i36.photobucket.com/albums/e7/saoshyantdesu/dgdgjdngd.png

The fact whoever closed the bug without even testing this issues marks said person as an amateur.
Comment 3 Olivier Thereaux 2006-11-03 05:46:42 UTC
(In reply to comment #2)
> Created an attachment (id=442) [edit]

Thank you for this test case.

> The fact whoever closed the bug without even testing this issues marks said
> person as an amateur.

This comment is highly inappropriate. Inappropriate in general, as you are expected to remain polite and respectful in reporting issues with this free tool. 

It is also inappropriate in this particular case. Your bug report was poor and confusing. You should have:
- attached a test case, or
- pointed to a test case, or at least
- given clear information about the document type used
Instead, you gave unclear and confusing information, mentioning XHTML and quoting the XHTML 1.0 specification, hence the assumption that this is the document type you were using. The issue *was* tested with XHTML 1.0, and found inexistent there. 

Now that we have decent information about the issue, now that we know you were using XHTML 1.1 we will be looking into its cause and solutions.


Please try to send proper bug reports in the future, and to do so with an appropriate tone.

Regards,
olivier




Comment 4 Olivier Thereaux 2006-11-03 06:09:15 UTC
Looks like a discrepancy between the flat and modular DTDs for XHTML 1.1

http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Style_Sheet
has
<!ENTITY % style.attlist  "INCLUDE" >
<![%style.attlist;[
<!ATTLIST %style.qname;
      %XHTML.xmlns.attrib;
      %id.attrib;
      %title.attrib;
      %I18n.attrib;
      type         %ContentType.datatype;   #REQUIRED
      media        %MediaDesc.datatype;     #IMPLIED
>
<!-- end of style.attlist -->]]>

While the flat DTD is missing the id.attrib line.

Will contact the HTML working group to see if this is a known errata to XHTML 1.1.
Comment 5 Olivier Thereaux 2006-11-06 00:34:21 UTC
> Will contact the HTML working group to see if this is a known errata to XHTML
> 1.1.

http://lists.w3.org/Archives/Public/www-html-editor/2006OctDec/0024.html
(waiting for answer from HTML WG)
Comment 6 Olivier Thereaux 2007-03-01 06:10:49 UTC
ditto for <html id="foo"> apparently.

http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_structuremodule
says id is an attribute for element html, but the DTD apparently misses it:
http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#dtdelement_body.qname
Comment 7 Olivier Thereaux 2007-03-01 06:21:25 UTC
(In reply to comment #6)
> ditto for <html id="foo"> apparently.

Reported to the HTML WG:
http://lists.w3.org/Archives/Public/www-html-editor/2007JanMar/0038.html

waiting for an answer...
Comment 8 Olivier Thereaux 2007-03-02 03:08:22 UTC
Apparently this problem with XHTML-mod is being addressed by the HTML WG.
http://htmlwg.mn.aptest.com/cgi-bin/voyager-issues/Modularization-DTDs?id=9613

Leaving as open for now, until the next publication of the Modularization DTDs.
Comment 9 Ville Skyttä 2009-10-05 20:18:27 UTC
xhtml11-flat.dtd from WD-xhtml11-20070216 which is what the validator is currently using seems to have style id="...".

http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#dtdelement_html.qname
has html id="...", ditto the corresponding module at http://www.w3.org/MarkUp/DTD/xhtml-struct-1.mod, but the latest XHTML 1.1 flat DTD still lacks it: http://www.w3.org/MarkUp/DTD/xhtml11-flat.dtd (and appears to have other issues as well, see bug 6597 comment 7).