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 2001/03/18 07:53:20 UTC

[Bug 1010] Changed - getElementByID() fails when using custom document factory subclassing DocumentImpl

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

*** shadow/1010	Sat Mar 17 22:42:54 2001
--- shadow/1010.tmp.29925	Sat Mar 17 22:53:20 2001
***************
*** 4,11 ****
  |        Bug #: 1010                        Product: Xerces-J                |
  |       Status: NEW                         Version: 1.3.0                   |
  |   Resolution:                            Platform: PC                      |
! |     Severity: Normal                   OS/Version:                         |
! |     Priority:                           Component: DOM                     |
  +----------------------------------------------------------------------------+
  |  Assigned To: xerces-j-dev@xml.apache.org                                  |
  |  Reported By: tom.dillon@trilogy.com                                       |
--- 4,11 ----
  |        Bug #: 1010                        Product: Xerces-J                |
  |       Status: NEW                         Version: 1.3.0                   |
  |   Resolution:                            Platform: PC                      |
! |     Severity: Normal                   OS/Version: All                     |
! |     Priority: High                      Component: DOM                     |
  +----------------------------------------------------------------------------+
  |  Assigned To: xerces-j-dev@xml.apache.org                                  |
  |  Reported By: tom.dillon@trilogy.com                                       |
***************
*** 26,29 ****
  
  The problem is at line 934 of the 1.3.0 DOMParser.java.
  
! if (docClass.isAssignableFrom(defaultDocClass))
--- 26,52 ----
  
  The problem is at line 934 of the 1.3.0 DOMParser.java.
  
! if (docClass.isAssignableFrom(defaultDocClass))
! 
! ------- Additional Comments From tom.dillon@trilogy.com  2001-03-17 22:53 -------
! 
! whoops.  submitted this before I was finished.
! 
! Anyway, the problem is that isAssignableFrom is being used backwards, and as a 
! result the variable fDocumentImpl doesn't get set.  If fDocumentImpl is not set 
! then we don't call putIdentifier when creating elements.
! 
! The fix is that
! 
! if (docClass.isAssignableFrom(defaultDocClass)) {
! 
! should read
! 
! if (defaultDocClass.isAssignableFrom(docClass)) {
! 
! If I make this change it works like a champ.
! 
! The problem exists in 1.3.1 as well, albeit in a different form.  In 1.3.0 it 
! was trying to see if you'd subclassed DocumentImpl, and if so it would take 
! advantage of that fact.  This was broken, but hey, it was trying.  In 1.3.1 
! it's not even trying.

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