You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ce...@apache.org on 2005/09/15 02:20:47 UTC

svn commit: r280978 - /xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomImpl.java

Author: cezar
Date: Wed Sep 14 17:20:42 2005
New Revision: 280978

URL: http://svn.apache.org/viewcvs?rev=280978&view=rev
Log:
Yana Kadiyska. Bug fix -- ensure TextNode caches are current before using them

Modified:
    xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomImpl.java

Modified: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomImpl.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomImpl.java?rev=280978&r1=280977&r2=280978&view=diff
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomImpl.java (original)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomImpl.java Wed Sep 14 17:20:42 2005
@@ -1465,6 +1465,12 @@
             Xobj src = (Xobj) cn._src;
             //if src is attr this node is always value and
             // next is always the next ptr of the attr
+            src._charNodesAfter =
+                                    Cur.updateCharNodes( src._locale, src, src._charNodesAfter, src._cchAfter );
+
+            src._charNodesValue =
+                                  Cur.updateCharNodes( src._locale, src, src._charNodesValue, src._cchValue );
+
             if (cn._next != null)
             {
                 ns = cn._next;
@@ -2401,10 +2407,16 @@
                 Xobj src = (Xobj) node._src;
                 src.ensureOccupancy();
                 boolean isThisNodeAfterText = node.isNodeAftertext();
-                s =
-                    isThisNodeAfterText ?
-                    src.getCharsAfterAsString(node._off, node._cch) :
-                    src.getCharsValueAsString(node._off, node._cch);
+                if( isThisNodeAfterText ){
+                    src._charNodesAfter =
+                        Cur.updateCharNodes( src._locale, src, src._charNodesAfter, src._cchAfter );
+                    s = src.getCharsAfterAsString(node._off, node._cch);
+                }
+                else{
+                    src._charNodesValue =
+                       Cur.updateCharNodes( src._locale, src, src._charNodesValue, src._cchValue );
+                    s = src.getCharsValueAsString(node._off, node._cch);
+                }
 
             }
             break;



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