Closed
Bug 263934
Opened 21 years ago
Closed 19 years ago
XMLList assign produces bogus result
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.6R6
People
(Reporter: igor, Unassigned)
References
Details
-------- Original Message --------
Subject: Found a few E4X bugs
Date: Fri, 30 Jul 2004 16:47:40 -0700
From: John Schneider <john.schneider@agiledelta.com>
Reply-To: <john.schneider@agiledelta.com>
Organization: AgileDelta, Inc.
Description: Replacing a list item with a new list that contains that item
causes incorrect result.
Test case:
var x = <x>
<b>two</b>
<b>three</b>
</x>;
// insert <a> element in from of first <b> element
x.b[0] = <a>one</a> + x.b[0];
print(x);
Expected:
<x>
<a>one</a>
<b>two</b>
<b>three</b>
</x>
Actual:
<x>
<a>one</a>
<a>one</a>
<b>three</b>
</x>
Reporter | ||
Updated•21 years ago
|
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 1•21 years ago
|
||
Wrong bug to resolve
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 2•20 years ago
|
||
I found a similar problem when appending elements using the += operator. The
problem only appears if there are space characters between tags in the existing
list and XML.ignoreWhitespace is set to false. Here's how to reproduce it in
Rhino shell:
js> XML.ignoreWhitespace = false;
false
js> var xml = <a> <b/><b/></a>;
js> xml.b += <c/>;
<b/>
<b/>
<c/>
js> print(xml);
<a>
<b/>
</a>
js>
The expected result from print(xml) would be
<a>
<b/>
<b/>
<c/>
</a>
Note that if I leave away the space char in the original XML literal, or don't
set XML.ignoreWhitespace to false, the result is as expected. If I add more
spaces, I get other bogus results.
Should I file a new bug for this? Are there any insights on the original bug,
such as where to look, and if this is a Rhino or a XMLBeans bug?
Reporter | ||
Comment 3•20 years ago
|
||
Marking as fixed: new issues should be reported as bugs
Status: REOPENED → RESOLVED
Closed: 21 years ago → 20 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•20 years ago
|
||
I "fixed" the wrong bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 5•19 years ago
|
||
Reassigning to please_see_bug_288433@eml.cc pending resolution of bug 288433
Assignee: igor.bukanov → please_see_bug_288433
Status: REOPENED → NEW
Updated•19 years ago
|
Assignee: please_see_bug_288433 → nobody
Updated•19 years ago
|
OS: Linux → All
Comment 6•19 years ago
|
||
This issue is fixed in the coming non-XMLBeans implementation of E4X, or at least the first issue is. The test in comment #2 gives output other than that suggested, but I'm not sure which is right. The output given is:
<a>
<b/>
<b/>
<c/>
</a>
I'd have to carefully go back to the pretty-printing part of the spec to see whether the extra newline is appropriate given the presence of a non-empty text node in there.
Status: NEW → ASSIGNED
Depends on: 355677
Comment 7•19 years ago
|
||
My reading of ECMA357 2nd ed. 10.2.1 is that the output in comment 6 is correct, thus I am closing this bug as fixed (if XMLBeans is not present, of course; see bug 355677).
Status: ASSIGNED → RESOLVED
Closed: 20 years ago → 19 years ago
Resolution: --- → FIXED
Comment 8•18 years ago
|
||
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.
Description
•