You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2009/12/14 20:56:32 UTC

svn commit: r890460 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/html/dom/HTMLBuilder.java

Author: mrglavas
Date: Mon Dec 14 19:56:24 2009
New Revision: 890460

URL: http://svn.apache.org/viewvc?rev=890460&view=rev
Log:
JIRA Issue #1407: http://issues.apache.org/jira/browse/XERCESJ-1407. Some additional improvements thanks to the patch by  Ludger Bünger. Use Document factory methods instead of directly calling constructors in HTMLBuilder.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/html/dom/HTMLBuilder.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/html/dom/HTMLBuilder.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/html/dom/HTMLBuilder.java?rev=890460&r1=890459&r2=890460&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/html/dom/HTMLBuilder.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/html/dom/HTMLBuilder.java Mon Dec 14 19:56:24 2009
@@ -21,7 +21,6 @@
 
 import org.apache.xerces.dom.ElementImpl;
 import org.apache.xerces.dom.ProcessingInstructionImpl;
-import org.apache.xerces.dom.TextImpl;
 import org.w3c.dom.Node;
 import org.w3c.dom.html.HTMLDocument;
 import org.xml.sax.AttributeList;
@@ -173,7 +172,7 @@
     {
 	if ( _current == null )
             throw new SAXException( "HTM009 State error: character data found outside of root element." );
-	_current.appendChild( new TextImpl( _document, text ) );
+        _current.appendChild( _document.createTextNode(text) );
     }
 
     
@@ -182,7 +181,7 @@
     {
 	if ( _current == null )
             throw new SAXException( "HTM010 State error: character data found outside of root element." );
-	_current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
+        _current.appendChild( _document.createTextNode(new String(text, start, length)) );
     }
     
     
@@ -190,7 +189,7 @@
         throws SAXException
     {        
         if ( ! _ignoreWhitespace )
-	    _current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
+            _current.appendChild( _document.createTextNode(new String(text, start, length)) );
      }
     
     
@@ -207,9 +206,9 @@
 	}
 	else
         if ( _current == null && _document != null )
-	    _document.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
+            _document.appendChild( _document.createProcessingInstruction(target, instruction) );
 	else
-	    _current.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
+        _current.appendChild( _document.createProcessingInstruction(target, instruction) );
     }
     
     



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