Re: bug in e4x? missing = in XML attribute

Leni <[email protected]> Mon, 16 Feb 2009 09:05:17 +1100
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
Martin Honnen wrote:
> I can't reproduce the issue with Firefox 3.0 (Mozilla/5.0 (Windows; U; 
> Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6). Test 
> case is at
> http://home.arcor.de/martin.honnen/javascript/2009/02/test2009021501.html
> and loads XML document from
> http://home.arcor.de/martin.honnen/javascript/2009/02/test2009021501Test.xml 
> which is the file you sent.
> 
> I don't get any script or XML parsing errors.

Yes, you are right.

The extension I am working on is for Thunderbird2 and Thunderbird3, and 
I can only reproduce the problem under Thunderbird2, not Thunderbird3. 
Sorry for not making this clear in the original posting (I didn't test tb3).

If you are curious to reproduce this problem in Thunderbird using 
Martin's test case, install the ThunderbirdBrowse extension:
https://addons.mozilla.org/en-US/thunderbird/addon/5373

Then visit the link in ThunderBrowse:
http://home.arcor.de/martin.honnen/javascript/2009/02/test2009021501.html

In Thunderbird3, the page is served correctly - the XML is shown.

In Thunderbird2, the page is not served correctly - the javascript error 
console reports:

   Error: e.target.parentNode.hasAttribute is not a function
   Source File: chrome://tbrowse/content/tburlclk.js
   Line: 377

I won't file a bug report for this tb2-only problem then because I doubt 
it would get much attention.

About a workaround for Thunderbird 2, the DOM ==> XMLSerializer ==> e4x 
technique does parse the XML but converts that 3-byte UTF-8 sequence 
into a '(' which makes it lossy.  If someone can shed any light on what 
is going on here and in particular, what class of UTF-8 byte sequences 
might be affected by such lossy conversion, it would help me evaluate 
whether this technique is acceptable.

Or if anyone can think of a better workaround for tb2 it will be welcome!

Thanks -

Leni.