DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13054>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13054

Prototype compareTreePosition() implementation fails

           Summary: Prototype compareTreePosition() implementation fails
           Product: Xerces2-J
           Version: 2.1.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: DOM
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Given the document:

<?xml version="1.0" encoding="UTF-8"?>
<OL>
  <LI>item1</LI>
  <LI attrib="2">item2</LI>
  <LI>item3</LI>
  <OL>
    <LI>subitem1</LI>
    <LI attrib="2">subitem2</LI>
    <!-- Now go deeper -->
    <OL>
      <LI>subitem3</LI>
    </OL>
  </OL>
  <?a-pi some data?>
</OL>

in a Xerces DOM, and variables N1 and N2 pointing at the first "attrib" and the 
text-node child of that element respectively, calling
     N1.compareTreePosition(N2);
is returning the value 1, TREE_POSITION_PRECEDING.

That's incorrect. The nomenclature of these values is bad, but they're supposed 
to describe the position of the agument node relative to the reference node -- 
ie, the node they are being called on -- and an attr is supposed to preceed 
descendents of its owning element, not vice versa.

Problem _seems_ to persist in today's CVS version of Xerces, though I haven't 
been able to get my XNI code working again well enough to be sure about that. 

Calling it Major because this is causing wrong results on some performance 
experiments I'm doing in Xalan. (Of course I can't pick up any fix that may 
appear until afte I've successfully adapt to the XNI changes. Grumble. Oh well, 
that happens sometimes.)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to