Closed
Bug 256691
Opened 21 years ago
Closed 21 years ago
E4X: hasSimpleContent can return false for attribute names
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.6R1
People
(Reporter: igor, Assigned: igor)
Details
Attachments
(1 file)
863 bytes,
patch
|
Details | Diff | Splinter Review |
Consider the following test case which is based on example from Richard McKinley:
var xml = <a attrname="something"> <b> <c/> </b> </a> ;
var simple = xml.@attrname.hasSimpleContent();
print (simple);
Since xml.@attrname is attribute this should print true in the shell. Instead it
prints false. This is rather sensitive to the structure of <a>, even slight
alterations restore the original behavior.
The bug is also visible in the following example:
var xml = <a attrname="something"> <b> <c/> </b> </a> ;
print(xml.@attrname == "something");
which prints false since xml == string can only be true if
xml.hasSimpleContent() is true and that simple content equals to the string.
Assignee | ||
Comment 1•21 years ago
|
||
For some reasons XmlCursor when it is recreated for the attribute attrname
returns true for toFirstChild call in the implementation of
XML.hasSimpleContent(). It can be a bug in xmlbeans or something that I do get.
In any case the patch forces hasSimpleContent to return true for attribute and
pure text cursor fixing the problem.
Assignee | ||
Comment 2•21 years ago
|
||
I committed the fix
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5R6
Updated•18 years ago
|
Component: Core → E4X
You need to log in
before you can comment on or make changes to this bug.
Description
•