You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@apache.org on 2003/08/23 06:51:24 UTC

cvs commit: xml-xerces/java/src/org/apache/html/dom HTMLDocumentImpl.java

andyc       2003/08/22 21:51:24

  Modified:    java/docs releases.xml
               java/src/org/apache/html/dom HTMLDocumentImpl.java
  Log:
  Fixed bug in HTML DOM implementation that would cause a hierarchy
  request error because it was trying to move all of the document
  node children to be children of the <html> node. But this is not
  desired behavior and actually causes a problem when trying to
  move the doctype node.
  
  Revision  Changes    Path
  1.159     +15 -2     xml-xerces/java/docs/releases.xml
  
  Index: releases.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/releases.xml,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -r1.158 -r1.159
  --- releases.xml	30 Jul 2003 13:38:53 -0000	1.158
  +++ releases.xml	23 Aug 2003 04:51:24 -0000	1.159
  @@ -1,7 +1,20 @@
  -<?xml version='1.0' encoding='UTF-8'?>
  +<?xml version='1.0' encoding='UTF-8'?>
   <!-- $Id$ -->
   <!DOCTYPE releases SYSTEM 'dtd/releases.dtd'>
   <releases>
  +  <release version='&ParserName; TBD'>
  +   <desc>TBD</desc>
  +   <changes>
  +    <fix>
  +     <note>
  +      Fixed bug in HTML DOM implementation that would cause a hierarchy
  +      request error by trying to move a doctype node to be a child of
  +      the &lt;html&gt; element.
  +     </note>
  +     <submitter name='Andy Clark'/>
  +    </fix>
  +   </changes>
  +  </release>
     <release version='&ParserName; 2.5.0'>
      <desc>
       This release provides a partial implementation of W3C XInclude specification as well as adds annotation support for the XML Schema component API. In addition to fixing many bugs, this release also brings Xerces into compliance with the most recent work of the W3C DOM working group on DOM level 3 Core and Load/Save, and includes additional fixes related to the XML 1.1 specification.
  
  
  
  1.17      +14 -1     xml-xerces/java/src/org/apache/html/dom/HTMLDocumentImpl.java
  
  Index: HTMLDocumentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLDocumentImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- HTMLDocumentImpl.java	8 May 2003 20:13:09 -0000	1.16
  +++ HTMLDocumentImpl.java	23 Aug 2003 04:51:24 -0000	1.17
  @@ -194,6 +194,18 @@
           {
               if ( html instanceof HTMLHtmlElement )
               {
  +                // REVISIT: [Q] Why is this code even here? In fact, the
  +                //          original code is in error because it will
  +                //          try to move ALL nodes to be children of the
  +                //          HTML tag. This is not the intended behavior
  +                //          for comments and processing instructions
  +                //          outside the root element; it will throw a
  +                //          hierarchy request error exception for doctype
  +                //          nodes; *and* this code shouldn't even be
  +                //          needed because the parser should never build
  +                //          a document that contains more than a single
  +                //          root element, anyway! -Ac
  +                /***
                   synchronized ( html )
                   {
                       child = getFirstChild();
  @@ -204,6 +216,7 @@
                           child = next;
                       }
                   }
  +                /***/
                   return (HTMLElement) html;
               }
               html = html.getNextSibling();
  
  
  

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