You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-cvs@xml.apache.org by er...@apache.org on 2004/03/24 00:57:13 UTC

cvs commit: xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2 Jsr173.java

ericvas     2004/03/23 15:57:13

  Modified:    v2/src/newstore2/org/apache/xmlbeans/impl/newstore2
                        Jsr173.java
  Log:
  Fixed stream bugs
  
  Revision  Changes    Path
  1.7       +29 -8     xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Jsr173.java
  
  Index: Jsr173.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Jsr173.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Jsr173.java	22 Mar 2004 16:51:12 -0000	1.6
  +++ Jsr173.java	23 Mar 2004 23:57:13 -0000	1.7
  @@ -130,9 +130,25 @@
                   }
               }
   
  -            assert _wholeDoc || !_cur.isSamePos( _end );
  +            if (!_wholeDoc)
  +            {
  +                // Set the _done bit properly
  +                
  +                _cur.push();
  +                
  +                try
  +                {
  +                    next();
  +                }
  +                catch ( XMLStreamException e )
  +                {
  +                    throw new RuntimeException( e.getMessage(), e );
  +                }
  +                    
  +                _cur.pop();
  +            }
   
  -            _done = false;
  +            assert _wholeDoc || !_cur.isSamePos( _end );
           }
   
           protected Cur getCur ( )
  @@ -196,9 +212,14 @@
                       _cur.toEnd();
                       _cur.next();
                   }
  +                else if (kind == Cur.ROOT)
  +                {
  +                    if (!_cur.toFirstAttr())
  +                        _cur.next();
  +                }
                   else
                       _cur.next();
  -
  +                
                   _done = _end != null && _cur.isSamePos( _end );
               }
   
  @@ -310,7 +331,7 @@
               Cur ca = c.tempCur();
               boolean match = false;
   
  -            if (c.isContainer())
  +            if (c.isElem())
               {
                   if (ca.toFirstAttr())
                   {
  @@ -362,7 +383,7 @@
               Cur ca = c.tempCur();
               boolean match = false;
   
  -            if (c.isContainer())
  +            if (c.isElem())
               {
                   if (ca.toFirstAttr())
                   {
  @@ -395,7 +416,7 @@
           {
               int n = 0;
               
  -            if (_cur.isContainer())
  +            if (_cur.isElem())
               {
                   Cur ca = _cur.tempCur();
                   
  @@ -472,7 +493,7 @@
           {
               int n = 0;
   
  -            if (_cur.isContainer())
  +            if (_cur.isElem())
               {
                   Cur ca = _cur.tempCur();
   
  @@ -504,7 +525,7 @@
               Cur ca = c.tempCur();
               boolean match = false;
   
  -            if (c.isContainer())
  +            if (c.isElem())
               {
                   if (ca.toFirstAttr())
                   {
  
  
  

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