DOM::Document::getElementsByTagName bug ?

pettay at mappi.helsinki.fi pettay at mappi.helsinki.fi
Mon Feb 2 09:49:45 GMT 2004


Just FYI, 

http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-5353782642
>Developers need to take two things into account when writing code that
>works on both HTML and XHTML documents. When comparing element or attribute
>names to strings, the string compare needs to be case insensitive, or the
>element or attribute name needs to be converted into lowercase before 
>comparing against a lowercase string. Second, when calling methods that are
>case insensitive when used on a HTML document (such as 
>getElementsByTagName() and namedItem()), the string that is passed in 
>should be lowercase.


Quoting David Faure <faure at kde.org>:

> On Monday 02 February 2004 09:16, Shift wrote:
> > Le lundi 2 Février 2004 08:37, David Faure a écrit :
> > > No. For HTML documents (not XHTML nor XML), tags are exposed
> uppercase.
> > 
> > So I should check for both ? upper and lowercase ?
> Yes, I'd say so.
> 
> > http://bugs.kde.org/show_bug.cgi?id=57803 is a testcase.
> I see. Well, it's XHTML, so tags are exposed lowercase - no bug.
> 
> -- 
> 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