DOM::Document::getElementsByTagName bug ?

David Faure faure at kde.org
Mon Feb 2 07:37:58 GMT 2004


On Sunday 01 February 2004 18:39, Shift wrote:
> Hi,
> 
> I have few questions about "NodeList DOM::Document::getElementsByTagName 
> (const DOMString & tagname)".
> 
> Is case important for this function ?
Yes.

> Few days ago when I used getElementsByTagName ("LINK") in 
> http://bugs.kde.org/show_bug.cgi?id=57803 I retrieved 8 elements and now 0.
Did you really mean 57803? It looks unrelated ("css for paged media").

> So I decided to use getElementsByTagName ("link") an then I retrieved 8 
> elements.
Sounds like a bug indeed, if it's about an HTML document.

> Should the argument of getElementsByTagName  always in lowercase ? 
No. For HTML documents (not XHTML nor XML), tags are exposed uppercase.

> Is it a DOM specification ? (When I look at the DOM specifications 
> http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html I can't find an 
> answer)
It's specified in Dom Level 2.

Do you have a testcase?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list