On Fri, August 25, 2006 7:18 am, Klaus Hartl said:
> Hi,
>
> I just spotted in Revision 226, that jQuery will not by all means
> support XHTML as XML.
>
> Line 743 reads:
>
> if ( table && this.nodeName == "TABLE" && a[0].nodeName != "THEAD" ) {
>
> nodeName in XML preserves case, that means in XHTML as XML it would
> return "table" and "thead" so that doesn't work here.
>
> This may not have high priority but needs to be fixed, maybe in jQuery
> 1.01 or something?
>
> Fix:
>
> if ( table && this.nodeName.toUpperCase() == "TABLE" &&
> a[0].nodeName.toUpperCase() != "THEAD" ) {

Actually the standard fix I've seen most often is to fold to lowercase,
not uppercase.  (Lowercase, because it's variable height, is generally
easier to read.)

This is an incompatibility between HTML (where JS folds to uppercase) and
XHTML/XML (where JS stays at the existing lowercase).  Case folding to
lower is the recommended future-friendly method, I think.

--Larry Garfield


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to