From: Wolfgang M. M. <wol...@us...> - 2004-05-10 11:23:01
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util/serializer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25553/src/org/exist/util/serializer Modified Files: DOMStreamer.java Log Message: XUpdate: * Btree not correctly updated after node changes, leading to NullPointerException * Attribute values truncated * Page splitting error results in NullPointerException after a few hundred XUpdates * New configuration parameter to control XUpdate behaviour Other: * Properties passed to Collection, XPathQueryService, XQueryService had no effect. * Modified evaluation of index settings in conf.xml. Index: DOMStreamer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/serializer/DOMStreamer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMStreamer.java 1 Dec 2003 08:22:54 -0000 1.3 --- DOMStreamer.java 10 May 2004 11:22:51 -0000 1.4 *************** *** 28,31 **** --- 28,32 ---- import java.util.Stack; + import org.exist.dom.QName; import org.w3c.dom.Attr; import org.w3c.dom.CharacterData; *************** *** 173,186 **** // output attributes AttributesImpl saxAttrs = new AttributesImpl(); for (int i = 0; i < attrs.getLength(); i++) { nextAttr = (Attr) attrs.item(i); saxAttrs.addAttribute( ! nextAttr.getNamespaceURI(), ! nextAttr.getLocalName(), nextAttr.getNodeName(), "CDATA", nextAttr.getValue()); } ! contentHandler.startElement(node.getNamespaceURI(), node.getLocalName(), node.getNodeName(), saxAttrs); break; --- 174,197 ---- // output attributes AttributesImpl saxAttrs = new AttributesImpl(); + String attrNS, attrLocalName; for (int i = 0; i < attrs.getLength(); i++) { nextAttr = (Attr) attrs.item(i); + attrNS = nextAttr.getNamespaceURI(); + if(attrNS == null) + attrNS = ""; + attrLocalName = nextAttr.getLocalName(); + if(attrLocalName == null) + attrLocalName = QName.extractLocalName(nextAttr.getNodeName()); saxAttrs.addAttribute( ! attrNS, ! attrLocalName, nextAttr.getNodeName(), "CDATA", nextAttr.getValue()); } ! String localName = node.getLocalName(); ! if(localName == null) ! localName = QName.extractLocalName(node.getNodeName()); ! contentHandler.startElement(node.getNamespaceURI(), localName, node.getNodeName(), saxAttrs); break; |