Subj : Re: Different handling of XML literals in Spidermonkey and Rhino To : Martin.Honnen From : Brendan Eich Date : Sat Mar 26 2005 06:38 pm Martin Honnen wrote: > Looking at that it seems Spidermonkey behaves correctly while Rhino has > bugs, it should be able to handle the literals/initializers for > comments, processing instructions, and cdata sections. > > However, I am not sure how the default for > XML.ignoreComments/ignoreProcessingInstructions come into play here and > what is really supposed to happen. XML.ignore{Comments,ProcessingInstructions} affect only 10.3.2 "ToXML Applied to a W3C XML Information Item", but that section's algorithm is invoked by 10.3.1 "ToXML Applied to the String Type", step 4. So it looks like SpiderMonkey is failing to respect these flags here. I'll fix ASAP. > What do other think, does Rhino have a bugs? Certainly Rhino has bugs if it can be made to hang or crash via these inputs. > For instance when I change > the ignoreComments setting I still get the error: > > Rhino 1.6 release 1 2004 11 30 > js> XML.ignoreComments > true > js> XML.ignoreComments = false; > false > js> var comment = ; > comment.nodeKind() > js: "", line 3: uncaught JavaScript runtime exception: TypeError: > Cannot call method "nodeKind" of undefined It seems Rhino just has bugs dealing with XML comments (and PIs, I guess, but you didn't show an example). /be .