Subj : Re: E4X: calling appendChild method with existing child as the argument To : Martin.Honnen From : Brendan Eich Date : Sat Apr 09 2005 11:45 am Martin Honnen wrote: > >> SpiderMonkey is correct if you follow ECMA-357 9.2.1.2 XMLList >> [[Put]], in particular 2(g)(ii)(2). > > > If Spidermonkey is correct should it be able to deal with "recursive" > XML like the following? > > var god = Kibo; > var infiniteGod = god.appendChild(god); > print('infiniteGod.nodeKind(): ' + infiniteGod.nodeKind()); > print(god.toXMLString()); I knew you were going to ask that ;-). XML should be tree structured. Any cycles or join points are malformed, and cycles mean iloops. This certainly makes it look more and more like a spec bug (unless I have misread the spec badly, many times over). Bcc'ing spec pals again. /be .