You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/01/10 22:31:25 UTC

DO NOT REPLY [Bug 5794] New: - getOwnerDocument() broken?

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=5794>.
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=5794

getOwnerDocument() broken?

           Summary: getOwnerDocument() broken?
           Product: Xerces-J
           Version: 1.4.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: alberto_squassabia@hp.com


// this returns d==null all the time
Node localRoot = . . .
. . .
Document d = localRoot.getOwnerDocument();

// this returns d!=null only when d=(Document)localRoot;
   Node localRoot = . . .
   . . .
   Document d = null;
   if (localRoot instanceof Document) {
       d=(Document)localRoot;
   } else {
       localRoot.getOwnerDocument();
   };

Javadoc says: "When this node [localRoot] is a Document
or a DocumentType which is not used with any Document yet,
this is null."  But localRoot is a non-null node of a
Document in scope.   Is it possible that getOwnerDocument()
is broken (I tested on jdk 1.3.0, 1.1.8)?

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org