Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

e4x duplicate xmlns attributes

2 views
Skip to first unread message

kael

unread,
Feb 25, 2009, 4:14:21 PM2/25/09
to
Hello,

I'm trying to parse an XML content containing multiple namespaces with
E4X. Walking through the XML has the side-effect of creating duplicates
namespaces :


var doc = <a xmlns='http://example.org/1'>
<b xmlns='http://example.org/2'>
<c xml:base="http://example.net/feed" type="html">
Foo <p>Bar</p> Foobar
</c>
</b>
</a>;

doc[0].*::b[0]
> <b xmlns="http://example.org/2" xmlns="http://example.org/1">
> <c xml:base="http://example.net/feed" type="html">
> Foo <p>Bar</p> Foobar
> </c>
> </b>

doc[0].*::b[0].*::c[0]
> <c xml:base="http://example.net/feed" type="html" xmlns="http://example.org/2" xmlns="http://example.org/1">
> Foo <p>Bar</p> Foobar
> </c>

doc[0].*::b[0].*::c[0].*::*
> Foo <p xmlns="http://example.org/2" xmlns="http://example.org/1">Bar</p> Foobar


Version: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6)
Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6

Is this a bug ?

--
kael

Martin Honnen

unread,
Feb 28, 2009, 9:26:49 AM2/28/09
to
kael wrote:

I have filed https://bugzilla.mozilla.org/show_bug.cgi?id=480711 on this.


--

Martin Honnen
http://JavaScript.FAQTs.com/

0 new messages