Closed Bug 289117 Opened 20 years ago Closed 18 years ago

strange text node with toString showing up as <xml-fragment/> in descendants

Categories

(Rhino Graveyard :: E4X, defect)

1.6R1
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martin.honnen, Unassigned)

References

Details

Attachments

(1 file)

I have a test case I will upload next that has an XML initializer with XHTML
markup. When I iterate with for each over the descendants of the XML object the
first descendant showing up has nodeKind() 'text' and toString()
'<xml-fragment/>' which is very odd, the first descendant should be the XHMTL
<head> element.

Here is the result of running the test case I am going to upload with Rhino (1.6
release 1 2004 11 30):

js> load('mozillaBugs/e4x/descendantOddity1.js');
nodeKind(): text
toString(): <xml-fragment/>

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::head

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::title

nodeKind(): text
toString(): XHTML example

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::body

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::p

nodeKind(): text
toString(): Kibology for all

Everything is fine besides that odd text node. The correct output with
Spidermonkey is:

js> load('mozillaBugs/e4x/descendantOddity1.js')
nodeKind(): element
name(): http://www.w3.org/1999/xhtml::head

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::title

nodeKind(): text
toString(): XHTML example

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::body

nodeKind(): element
name(): http://www.w3.org/1999/xhtml::p

nodeKind(): text
toString(): Kibology for all
CC Bob Clary to include the test to the suite

To Martin:

Until bug 288433 would be resolved and Rhino get a new bug owner I suggest to CC
Bob Clary <moz@bclary.com> whenever you would have a test case that can go to
the mozilla JS test suite. I hope Bob would not mind it.
sure, cc me on anything you want done related to js qa or the test library.

Checking in 13.4.4.12-1.js;
/cvsroot/mozilla/js/tests/e4x/XML/13.4.4.12-1.js,v  <--  13.4.4.12-1.js
initial revision: 1.1
Reassigning to please_see_bug_288433@eml.cc pending resolution of bug 288433
Assignee: igor.bukanov → please_see_bug_288433
Assignee: please_see_bug_288433 → nobody
This bug is fixed in the upcoming non-XMLBeans implementation of E4X for Rhino.  See bug 355677.
Status: NEW → ASSIGNED
Depends on: 355677
Rhino now passes test e4x/XML/13.4.4.12-1.js if XMLBeans is not present.  See bug 355677.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Adding target milestone of 1.6R6 based on the date this bug was resolved FIXED.
Target Milestone: --- → 1.6R6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: