Closed
Bug 277297
Opened 20 years ago
Closed 20 years ago
the nodeName of an attribute should not be lower-cased.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: maros.ivanco, Unassigned)
References
Details
Attachments
(2 files)
|
608 bytes,
text/html
|
Details | |
|
924 bytes,
patch
|
jst
:
review-
jst
:
superreview-
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231 It seams, that mozilla lower-cases nodeName of attribute. If an element has an attribute 'myAttribute', the nodeName of the attribute in mozilla is 'myattribute', but should be 'myAttribute'. Reproducible: Always Steps to Reproduce: 1.load attached test page 2. 3. Actual Results: Mozilla allerts nodeName of 'v:minLength' attributes in div and input. Both nodeNames are in lowercase. Expected Results: It should alert 'v:minLength' in both cases.
| Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
Actually, the nodename should be all uppercase for HTML. See http://w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-5353782642 paragraph two.
Comment 3•20 years ago
|
||
This does depend on the patch in bug 103225. I can remove that dependency if desired.
Assignee: general → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Attachment #170493 -
Flags: superreview?(jst)
Attachment #170493 -
Flags: review?(jst)
Updated•20 years ago
|
Depends on: 103225
OS: Linux → All
Priority: -- → P2
Hardware: PC → All
Summary: the nodeName of an attribute should not be lower-cased. → [FIX]the nodeName of an attribute should not be lower-cased.
Target Milestone: --- → mozilla1.8beta
mroz: If you want to use XHTML (where case of attributes and elements will be preserved) you should use application/xhtml+xml or text/xml as mimetype. text/html is always internpreted as HTML
Comment 5•20 years ago
|
||
How about nsDOMAttribute::GetLocalName?
Comment 6•20 years ago
|
||
Comment on attachment 170493 [details] [diff] [review] Patch to that effect There's an apparently unpublished errata to the DOM Level 2 HTML spec about this, it's at http://www.w3.org/DOM/Group/drafts/2000/11/DOM-Level-2-errata#html-2 (for my reference, as I don't think that's publicly reachable). That errata states: --- html-2. [error]. XHTML and the HTML DOM. The sentences: For instance, element and attribute names are exposed as all uppercase (for consistency) when used on an HTML document, regardless of the character case used in the markup. Since XHTML is based on XML, in XHTML everything is case sensitive, and element and attribute names must be lowercase in the markup. should read For instance, element names are exposed as all uppercase (for consistency) when used on an HTML document, regardless of the character case used in the markup. The names of attributes defined in HTML 4.01 are also exposed as all lowercase, regardless of the character case used in the markup, but for other attributes (i.e. ones that are not defined by HTML 4.01), the character casing is implementation dependent. Since XHTML is based on XML, in XHTML everything is case sensitive, and element and attribute names must be lowercase in the markup. --- So in other words we don't want this change. If anything we should identify valid HTML attributes and leave those unchanged (in the parser or wherever we lowercase attribute names today). I'm checking why this errata is not public yet...
Attachment #170493 -
Flags: superreview?(jst)
Attachment #170493 -
Flags: superreview-
Attachment #170493 -
Flags: review?(jst)
Attachment #170493 -
Flags: review-
Comment 7•20 years ago
|
||
Er... per that text the HTML 4.01 attributes _must_ be lowercased (as we do), and the other attributes _may_ be lowercased (as we do). So in other words, this bug is invalid, as far as I can see.
Comment 8•20 years ago
|
||
Yeah, um, that's what I meant, except that we *could* change our code to leave non-HTML attribute names alone and not mess with the character case in those names at all, as IE apparently does. Not high priority tho, as we're not in violation of the spec (errata) here at all.
Comment 9•20 years ago
|
||
I think that would more effort than is worth it (we'd need to hardcode a list of HTML attributes somewhere). Also, the spec is unclear as to what happens for "HTML attributes" that are on the wrong element (eg <div sRc="whatever">). So unless we plan to reverse-engineer IE...
Assignee: bzbarsky → general
Status: ASSIGNED → UNCONFIRMED
Priority: P2 → --
Summary: [FIX]the nodeName of an attribute should not be lower-cased. → the nodeName of an attribute should not be lower-cased.
Target Milestone: mozilla1.8beta → ---
Comment 10•20 years ago
|
||
Since nobody has arguments against Comment #9, and 3 months passed,I think I can safely mark the bug as WONTFIX
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•