gianugo 2002/12/13 06:27:41
Modified: java/src/org/apache/xindice/xml/sax SAXEventGenerator.java
Log:
Fixed a nasty bug in namespace handling when more than 5 namespasces were
declared.
Revision Changes Path
1.16 +10 -9
xml-xindice/java/src/org/apache/xindice/xml/sax/SAXEventGenerator.java
Index: SAXEventGenerator.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/xml/sax/SAXEventGenerator.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- SAXEventGenerator.java 12 Dec 2002 21:04:02 -0000 1.15
+++ SAXEventGenerator.java 13 Dec 2002 14:27:40 -0000 1.16
@@ -59,6 +59,12 @@
* $Id$
*/
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.xindice.util.ByteArrayInput;
import org.apache.xindice.xml.SymbolTable;
import org.apache.xindice.xml.XMLCompressedInput;
@@ -66,10 +72,9 @@
import org.apache.xindice.xml.dom.DOMCompressor;
import org.apache.xindice.xml.dom.DocumentImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
-import org.w3c.dom.*;
import org.xml.sax.ContentHandler;
import org.xml.sax.DTDHandler;
import org.xml.sax.EntityResolver;
@@ -81,10 +86,6 @@
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.AttributesImpl;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* SAXEventGenerator
*/
@@ -319,7 +320,7 @@
if (nsMapCount >= mappedPrefixes.length) {
String[] newBuf = new String[mappedPrefixes.length +
XMLNS_MAP_INCREMENT];
- System.arraycopy(mappedPrefixes, 0, newBuf, 0,
newBuf.length);
+ System.arraycopy(mappedPrefixes, 0, newBuf, 0,
mappedPrefixes.length);
mappedPrefixes = newBuf;
}