[kaffe] CVS kaffe (kaz): libraries/javalib/gnu/xml/aelfred2/XmlParser.java:

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Tue Sep 2 09:33:02 2003


PatchSet 4011 
Date: 2003/09/02 16:30:44
Author: kaz
Branch: HEAD
Tag: (none) 
Log:
2003-09-02  Ito Kazumitsu <kaz@maczuka.gcd.org>

        * libraries/javalib/gnu/xml/aelfred2/XmlParser.java:
        Corrected parseCharRef() so that it may not flush data buffer
        when not desired.

Members: 
	ChangeLog:1.1607->1.1608 
	libraries/javalib/gnu/xml/aelfred2/XmlParser.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1607 kaffe/ChangeLog:1.1608
--- kaffe/ChangeLog:1.1607	Tue Sep  2 00:53:58 2003
+++ kaffe/ChangeLog	Tue Sep  2 16:30:44 2003
@@ -1,3 +1,9 @@
+2003-09-02  Ito Kazumitsu <kaz@maczuka.gcd.org>
+
+	* libraries/javalib/gnu/xml/aelfred2/XmlParser.java:
+	Corrected parseCharRef() so that it may not flush data buffer
+	when not desired.
+
 2003-09-01  Jim Pick  <jim@kaffe.org>
 
 	* libraries/clib/net/NetworkInterface.c:
Index: kaffe/libraries/javalib/gnu/xml/aelfred2/XmlParser.java
diff -u kaffe/libraries/javalib/gnu/xml/aelfred2/XmlParser.java:1.1 kaffe/libraries/javalib/gnu/xml/aelfred2/XmlParser.java:1.2
--- kaffe/libraries/javalib/gnu/xml/aelfred2/XmlParser.java:1.1	Tue Dec  3 01:27:55 2002
+++ kaffe/libraries/javalib/gnu/xml/aelfred2/XmlParser.java	Tue Sep  2 16:30:46 2003
@@ -1,5 +1,5 @@
 /*
- * $Id: XmlParser.java,v 1.1 2002/12/03 01:27:55 dalibor Exp $
+ * $Id: XmlParser.java,v 1.2 2003/09/02 16:30:46 kaz Exp $
  * Copyright (C) 1999-2001 David Brownell
  * 
  * This file is part of GNU JAXP, a library.
@@ -69,7 +69,7 @@
 import org.xml.sax.SAXException;
 
 
-// $Id: XmlParser.java,v 1.1 2002/12/03 01:27:55 dalibor Exp $
+// $Id: XmlParser.java,v 1.2 2003/09/02 16:30:46 kaz Exp $
 
 /**
  * Parse XML documents and return parse events through call-backs.
@@ -79,7 +79,7 @@
  * @author Written by David Megginson &lt;dmeggins@microstar.com&gt;
  *	(version 1.2a with bugfixes)
  * @author Updated by David Brownell &lt;dbrownell@users.sourceforge.net&gt;
- * @version $Date: 2002/12/03 01:27:55 $
+ * @version $Date: 2003/09/02 16:30:46 $
  * @see SAXDriver
  */
 final class XmlParser
@@ -1721,6 +1721,11 @@
 	}
     }
 
+    private void parseCharRef ()
+    throws SAXException, IOException
+    {
+	parseCharRef (true /* do flushDataBuffer by default */);
+    }
 
     /**
      * Read and interpret a character reference.
@@ -1729,7 +1734,7 @@
      * </pre>
      * <p>NOTE: the '&#' has already been read.
      */
-    private void parseCharRef ()
+    private void parseCharRef (boolean doFlush)
     throws SAXException, IOException
     {
 	int value = 0;
@@ -1803,7 +1808,7 @@
 	    error ("character reference " + value + " is too large for UTF-16",
 		   new Integer (value).toString (), null);
 	}
-	dataBufferFlush ();
+	if (doFlush) dataBufferFlush ();
     }
 
 
@@ -2381,7 +2386,7 @@
 			    dataBufferAppend ('&');
 			    break;
 			}
-			parseCharRef ();
+			parseCharRef (false /* Do not do flushDataBuffer */);
 
 			// exotic WFness risk: this is an entity literal,
 			// dataBuffer [dataBufferPos - 1] == '&', and