Why is this E4X code not honoring the default namespace?

I am hacking a Firefox extension trying to use E4X. However, I ran into some strange problem:

var myXml = <test xmlns="http://test.com">
     Hey
     <inner>
        Guys
      </inner>
   </test>;

var ns = myXml.namespace();

default xml namespace = ns;

this.log(myXml.*::inner);
this.log(myXml.ns::inner);
this.log(myXml.inner);

      

The first two operators of the magazine print "Guys". The third is empty. What's happening? I have specified a default namespace and it is actually the same as what I use in the second log statement. Why doesn't it work?

Mozilla's documentation suggests this should work.

+1


source to share


1 answer


In Firefox 3, your code works as you expect. Maybe you are facing a bug found in an older version of Gecko?



+1


source







All Articles