xml-xmlbeans-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric...@apache.org
Subject cvs commit: xml-xmlbeans/v2/test/src/xmlobject/extensions/interfaceFeature/methodNameCollision/checkin NameCollisionTest.java
Date Mon, 16 Aug 2004 17:52:57 GMT
ericvas     2004/08/16 10:52:57

  Modified:    v2/src/typeimpl/org/apache/xmlbeans/impl/schema
                        SchemaTypeLoaderBase.java
               v2/src/typeimpl/org/apache/xmlbeans/impl/values
                        XmlObjectBase.java
               v2/src/xmlstore/org/apache/xmlbeans/impl/store Saver.java
               v2/test/src/dom/checkin DomTests.java
               v2/test/src/xmlcursor/checkin CopyTest.java
                        GetAllNamespacesTest.java MoveCharsTest.java
                        StoreTests.java ToFirstContentTokenTest.java
               v2/test/src/xmlcursor/xpath/jaxen/checkin
                        JaxenXPathTests.java
               v2/test/src/xmlobject/checkin AssortedTests.java
                        InstanceValidationTests.java
                        SelectChldAttTests.java
               v2/test/src/xmlobject/extensions/interfaceFeature/methodNameCollision/checkin
                        NameCollisionTest.java
  Log:
  De-activate newstore
  
  Revision  Changes    Path
  1.7       +18 -18    xml-xmlbeans/v2/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
  
  Index: SchemaTypeLoaderBase.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SchemaTypeLoaderBase.java	16 Aug 2004 15:58:26 -0000	1.6
  +++ SchemaTypeLoaderBase.java	16 Aug 2004 17:52:53 -0000	1.7
  @@ -19,8 +19,8 @@
   import org.apache.xmlbeans.impl.validator.ValidatingXMLInputStream;
   
   // NEWSTORE START
  -import org.apache.xmlbeans.impl.newstore2.Locale;
  -//import org.apache.xmlbeans.impl.store.Root;
  +//import org.apache.xmlbeans.impl.newstore2.Locale;
  +import org.apache.xmlbeans.impl.store.Root;
   // NEWSTORE END
   
   import org.apache.xmlbeans.SchemaAttributeGroup;
  @@ -187,8 +187,8 @@
               return hook.newInstance( this, type, options );
   
   // NEWSTORE START
  -        return Locale.newInstance( this, type, options );
  -//        return Root.newInstance( this, type, options );
  +//        return Locale.newInstance( this, type, options );
  +        return Root.newInstance( this, type, options );
   // NEWSTORE END
       }
   
  @@ -200,8 +200,8 @@
               return hook.parse( this, xmlText, type, options );
   
   // NEWSTORE START
  -        return Locale.parseToXmlObject( this, xmlText, type, options );
  -//        return Root.parse( this, xmlText, type, options );
  +//        return Locale.parseToXmlObject( this, xmlText, type, options );
  +        return Root.parse( this, xmlText, type, options );
   // NEWSTORE END
       }
   
  @@ -213,8 +213,8 @@
               return hook.parse( this, xis, type, options );
           
   // NEWSTORE START
  -        return Locale.parseToXmlObject( this, xis, type, options );
  -//        return Root.parse( this, xis, type, options );
  +//        return Locale.parseToXmlObject( this, xis, type, options );
  +        return Root.parse( this, xis, type, options );
   // NEWSTORE END
       }
   
  @@ -226,8 +226,8 @@
               return hook.parse( this, xsr, type, options );
   
   // NEWSTORE START
  -        return Locale.parseToXmlObject( this, xsr, type, options );
  -//        return Root.parse( this, xsr, type, options );
  +//        return Locale.parseToXmlObject( this, xsr, type, options );
  +        return Root.parse( this, xsr, type, options );
   // NEWSTORE END
       }
       
  @@ -343,8 +343,8 @@
               return hook.parse( this, jiois, type, options );
   
   // NEWSTORE START
  -        XmlObject result = Locale.parseToXmlObject( this, jiois, type, options );
  -//        XmlObject result = Root.parse( this, jiois, type, options );
  +//        XmlObject result = Locale.parseToXmlObject( this, jiois, type, options );
  +        XmlObject result = Root.parse( this, jiois, type, options );
   // NEWSTORE END
   
           if (digestStream != null)
  @@ -361,8 +361,8 @@
               return hook.parse( this, jior, type, options );
   
   // NEWSTORE START
  -        return Locale.parseToXmlObject( this, jior, type, options );
  -//        return Root.parse( this, jior, type, options );
  +//        return Locale.parseToXmlObject( this, jior, type, options );
  +        return Root.parse( this, jior, type, options );
   // NEWSTORE END
       }
   
  @@ -374,8 +374,8 @@
               return hook.parse( this, node, type, options );
   
   // NEWSTORE START
  -        return Locale.parseToXmlObject( this, node, type, options );
  -//        return Root.parse( this, node, type, options );
  +//        return Locale.parseToXmlObject( this, node, type, options );
  +        return Root.parse( this, node, type, options );
   // NEWSTORE END
       }
   
  @@ -387,8 +387,8 @@
               return hook.newXmlSaxHandler( this, type, options );
   
   // NEWSTORE START
  -        return Locale.newSaxHandler( this, type, options );
  -//        return Root.newSaxHandler( this, type, options );
  +//        return Locale.newSaxHandler( this, type, options );
  +        return Root.newSaxHandler( this, type, options );
   // NEWSTORE END
       }
   
  
  
  
  1.12      +12 -12    xml-xmlbeans/v2/src/typeimpl/org/apache/xmlbeans/impl/values/XmlObjectBase.java
  
  Index: XmlObjectBase.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/typeimpl/org/apache/xmlbeans/impl/values/XmlObjectBase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XmlObjectBase.java	16 Aug 2004 15:58:26 -0000	1.11
  +++ XmlObjectBase.java	16 Aug 2004 17:52:53 -0000	1.12
  @@ -236,18 +236,18 @@
           check_orphaned();
           
   // NEWSTORE START
  -        // Note that new_cursor does not really need sync ....
  -        
  -        XmlLocale l = getXmlLocale();
  -        
  -        if (l.noSync())         { l.enter(); try { return get_store().new_cursor(); } finally { l.exit(); } }
  -        else synchronized ( l ) { l.enter(); try { return get_store().new_cursor(); } finally { l.exit(); } }
  -
  -//        synchronized (monitor())
  -//        {
  -//            check_orphaned();
  -//            return get_store().new_cursor();
  -//        }
  +//        // Note that new_cursor does not really need sync ....
  +//        
  +//        XmlLocale l = getXmlLocale();
  +//        
  +//        if (l.noSync())         { l.enter(); try { return get_store().new_cursor(); } finally { l.exit(); } }
  +//        else synchronized ( l ) { l.enter(); try { return get_store().new_cursor(); } finally { l.exit(); } }
  +//
  +        synchronized (monitor())
  +        {
  +            check_orphaned();
  +            return get_store().new_cursor();
  +        }
   // NEWSTORE END
       }
   
  
  
  
  1.13      +7 -7      xml-xmlbeans/v2/src/xmlstore/org/apache/xmlbeans/impl/store/Saver.java
  
  Index: Saver.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/xmlstore/org/apache/xmlbeans/impl/store/Saver.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Saver.java	16 Aug 2004 15:58:27 -0000	1.12
  +++ Saver.java	16 Aug 2004 17:52:54 -0000	1.13
  @@ -4414,13 +4414,13 @@
               // to create the fragment
   
   // NEWSTORE START
  -            DOMImplementation impl =
  -                org.apache.xmlbeans.impl.newstore2.Public2.getDomImplementation();
  -
  -            _doc = impl.createDocument( null, "foo", null );
  -
  -            _doc.removeChild( _doc.getDocumentElement() );
  -//            _doc = ((DocumentBuilder) _threadDocumentBuilderFactory.get()).newDocument();
  +//            DOMImplementation impl =
  +//                org.apache.xmlbeans.impl.newstore2.Public2.getDomImplementation();
  +//
  +//            _doc = impl.createDocument( null, "foo", null );
  +//
  +//            _doc.removeChild( _doc.getDocumentElement() );
  +            _doc = ((DocumentBuilder) _threadDocumentBuilderFactory.get()).newDocument();
   // NEWSTORE END
   
               Node result;
  
  
  
  1.6       +12 -12    xml-xmlbeans/v2/test/src/dom/checkin/DomTests.java
  
  Index: DomTests.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/dom/checkin/DomTests.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DomTests.java	16 Aug 2004 15:58:27 -0000	1.5
  +++ DomTests.java	16 Aug 2004 17:52:55 -0000	1.6
  @@ -107,18 +107,18 @@
           doTestDomExport(xml);
   
   // NEWSTORE START
  -//        try {
  -//            xml =
  -//                    "<xml-fragment " +
  -//                    "  foo='bar'>" +
  -//                    "</xml-fragment>";
  -//
  -//            doTestDomExport(xml);
  -//
  -//            Assert.assertTrue(false);
  -//        }
  -//        catch (Exception e) {
  -//        }
  +        try {
  +            xml =
  +                    "<xml-fragment " +
  +                    "  foo='bar'>" +
  +                    "</xml-fragment>";
  +
  +            doTestDomExport(xml);
  +
  +            Assert.assertTrue(false);
  +        }
  +        catch (Exception e) {
  +        }
   // NEWSTORE END
   
           XmlObject x = XmlObject.Factory.parse(xx);
  
  
  
  1.6       +8 -8      xml-xmlbeans/v2/test/src/xmlcursor/checkin/CopyTest.java
  
  Index: CopyTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/checkin/CopyTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CopyTest.java	16 Aug 2004 15:58:27 -0000	1.5
  +++ CopyTest.java	16 Aug 2004 17:52:55 -0000	1.6
  @@ -154,16 +154,16 @@
           xc0.toPrevSibling();
           // assertEquals("<zip xmlns=\"" + Common.CLM_NS + "\" " + Common.CLM_XSI_NS + ">90952</zip>", xc0.xmlText());
   // NEWSTORE START
  -        String sExpected = "<po:zip " +
  -                "xmlns=\"http://www.tranxml.org/TranXML/Version4.0\" " +
  -                "xmlns:xsi=\"http://www.w3.org/2000/10/XMLSchema-instance\" " +
  -                "xmlns:po=\"http://xbean.test/xmlcursor/PurchaseOrder\">" +
  -                "90952</po:zip>";
  -//        String sExpected = "<pur:zip " +
  +//        String sExpected = "<po:zip " +
   //                "xmlns=\"http://www.tranxml.org/TranXML/Version4.0\" " +
   //                "xmlns:xsi=\"http://www.w3.org/2000/10/XMLSchema-instance\" " +
  -//                "xmlns:pur=\"http://xbean.test/xmlcursor/PurchaseOrder\">" +
  -//                "90952</pur:zip>";
  +//                "xmlns:po=\"http://xbean.test/xmlcursor/PurchaseOrder\">" +
  +//                "90952</po:zip>";
  +        String sExpected = "<pur:zip " +
  +                "xmlns=\"http://www.tranxml.org/TranXML/Version4.0\" " +
  +                "xmlns:xsi=\"http://www.w3.org/2000/10/XMLSchema-instance\" " +
  +                "xmlns:pur=\"http://xbean.test/xmlcursor/PurchaseOrder\">" +
  +                "90952</pur:zip>";
   // NEWSTORE END
   
           assertEquals(sExpected, xc0.xmlText());
  
  
  
  1.5       +7 -7      xml-xmlbeans/v2/test/src/xmlcursor/checkin/GetAllNamespacesTest.java
  
  Index: GetAllNamespacesTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/checkin/GetAllNamespacesTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GetAllNamespacesTest.java	16 Aug 2004 15:58:27 -0000	1.4
  +++ GetAllNamespacesTest.java	16 Aug 2004 17:52:55 -0000	1.5
  @@ -96,14 +96,14 @@
           toNextTokenOfType(m_xc, XmlCursor.TokenType.START);
   
   // NEWSTORE START
  -            m_xc.getAllNamespaces(null);
  -//        try {
   //            m_xc.getAllNamespaces(null);
  -//            fail("Map is null: should get an error");
  -//        }
  -//        catch (Exception e) {
  -//            System.err.println("Error thrown " + e.getMessage());
  -//        }
  +        try {
  +            m_xc.getAllNamespaces(null);
  +            fail("Map is null: should get an error");
  +        }
  +        catch (Exception e) {
  +            System.err.println("Error thrown " + e.getMessage());
  +        }
   // NEWSTORE END
       }
   
  
  
  
  1.5       +4 -4      xml-xmlbeans/v2/test/src/xmlcursor/checkin/MoveCharsTest.java
  
  Index: MoveCharsTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/checkin/MoveCharsTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MoveCharsTest.java	16 Aug 2004 15:58:27 -0000	1.4
  +++ MoveCharsTest.java	16 Aug 2004 17:52:55 -0000	1.5
  @@ -59,10 +59,10 @@
               assertEquals("234", xc1.getChars());
               assertEquals(3, m_xc.moveChars(3, xc1));
   // NEWSTORE START
  -            assertEquals("34", m_xc.getChars());
  -            assertEquals("34", xc1.getChars());
  -//            assertEquals("01234", m_xc.getChars());
  -//            assertEquals("234", xc1.getChars());
  +//            assertEquals("34", m_xc.getChars());
  +//            assertEquals("34", xc1.getChars());
  +            assertEquals("01234", m_xc.getChars());
  +            assertEquals("234", xc1.getChars());
   // NEWSTORE END
           } finally {
               xc1.dispose();
  
  
  
  1.5       +357 -357  xml-xmlbeans/v2/test/src/xmlcursor/checkin/StoreTests.java
  
  Index: StoreTests.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/checkin/StoreTests.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StoreTests.java	16 Aug 2004 15:58:27 -0000	1.4
  +++ StoreTests.java	16 Aug 2004 17:52:55 -0000	1.5
  @@ -383,7 +383,7 @@
           {
               _sb.append( s );
   // NEWSTORE START
  -            if (buf != null)
  +//            if (buf != null)
   // NEWSTORE END
               _sb.append( buf, off, cch );
               _sb.append( "\n" );
  @@ -1121,7 +1121,7 @@
           throws Exception
       {
   // NEWSTORE START
  -//        doXmlStreamTest( xml );
  +        doXmlStreamTest( xml );
   // NEWSTORE END
           doSaverTest( xml );
       }
  @@ -1162,311 +1162,311 @@
       }
   
   // NEWSTORE START
  -//    public void testXMLStream ( )
  -//        throws Exception
  -//    {
  -//        XmlObject o =
  -//            XmlObject.Factory.parse(
  -//                "<foo x=\"y\" xmlns=\"default.com\">" +
  -//                    "<!-- x -->bar</foo>" );
  -//        
  -//        XmlCursor c = o.newCursor();
  -//        
  -//        c.toNextToken();
  -//        c.toNextToken();
  -//        c.toNextToken();
  -//        c.toNextToken();
  -//        
  -//        c.insertElement( "bar", "bar.com" );
  -//        
  -//        c.toStartDoc();
  -//
  -//        XMLInputStream xis = c.newXMLInputStream();
  -//
  -//        XMLEvent xev;
  -//        StartDocument startDocument;
  -//        EndDocument endDocument;
  -//        StartElement startElement;
  -//        AttributeIterator attributeIterator;
  -//        StartPrefixMapping startPrefixMapping;
  -//        EndPrefixMapping endPrefixMapping;
  -//        ChangePrefixMapping cpm;
  -//        EndElement endElement;
  -//        Attribute attribute;
  -//        Comment comment;
  -//        CharacterData characterData;
  -//        XMLName name;
  -//        String str;
  -//        Map map;
  -//        
  -//        xev = startDocument = (StartDocument) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.START_DOCUMENT );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( startDocument.isStartDocument() );
  -//        
  -//        xev = startPrefixMapping = (StartPrefixMapping) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.START_PREFIX_MAPPING );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( xev.isStartPrefixMapping() );
  -//        str = startPrefixMapping.getNamespaceUri();
  -//        Assert.assertTrue( str.equals( "default.com" ) );
  -//        Assert.assertTrue( startPrefixMapping.getPrefix().length() == 0 );
  -//        
  -//        xev = startElement = (StartElement) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.START_ELEMENT );
  -//        Assert.assertTrue( xev.hasName() );
  -//        Assert.assertTrue( xev.isStartElement() );
  -//        assertName( startElement.getName(), "default.com", "foo", null );
  -//        attributeIterator = startElement.getAttributes();
  -//        attribute = attributeIterator.next();
  -//        assertName( attribute.getName(), null, "x", null );
  -//        Assert.assertTrue( attribute.getValue().equals( "y" ) );
  -//        Assert.assertTrue( attributeIterator.next() == null );
  -//        attributeIterator = startElement.getNamespaces();
  -//        attribute = attributeIterator.next();
  -//        assertName( attribute.getName(), null, "xmlns", null );
  -//        Assert.assertTrue( attribute.getValue().equals( "default.com" ) );
  -//        Assert.assertTrue( attributeIterator.next() == null );
  -//        attributeIterator = startElement.getAttributesAndNamespaces();
  -//        Assert.assertTrue( attributeIterator.next() != null );
  -//        Assert.assertTrue( attributeIterator.next() != null );
  -//        Assert.assertTrue( attributeIterator.next() == null );
  -//        name = new XmlNameImpl( null, "x", null );
  -//        attribute = startElement.getAttributeByName( name );
  -//        Assert.assertTrue( attribute != null );
  -//        Assert.assertTrue( attribute.getValue().equals( "y" ) );
  -//        name = new XmlNameImpl( null, "xmlns", null );
  -//        attribute = startElement.getAttributeByName( name );
  -//        Assert.assertTrue( attribute == null );
  -//        str = startElement.getNamespaceUri( null );
  -//        Assert.assertTrue( str.equals( "default.com" ) );
  -//
  -//        xev = startPrefixMapping = (StartPrefixMapping) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.START_PREFIX_MAPPING );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( xev.isStartPrefixMapping() );
  -//        str = startPrefixMapping.getNamespaceUri();
  -//        Assert.assertTrue( str.equals( "bar.com" ) );
  -//        Assert.assertTrue( startPrefixMapping.getPrefix().equals( "bar" ) );
  -//        
  -//        xev = startElement = (StartElement) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.START_ELEMENT );
  -//        Assert.assertTrue( xev.hasName() );
  -//        Assert.assertTrue( xev.isStartElement() );
  -//        assertName( startElement.getName(), "bar.com", "bar", "bar" );
  -//        attributeIterator = startElement.getAttributes();
  -//        Assert.assertTrue( attributeIterator.next() == null );
  -//        attributeIterator = startElement.getNamespaces();
  -//        attribute = attributeIterator.next();
  -//        assertName( attribute.getName(), null, "bar", "xmlns" );
  -//        Assert.assertTrue( attribute.getValue().equals( "bar.com" ) );
  -//        Assert.assertTrue( attributeIterator.next() == null );
  -//        attributeIterator = startElement.getAttributesAndNamespaces();
  -//        Assert.assertTrue( attributeIterator.next() != null );
  -//        Assert.assertTrue( attributeIterator.next() == null );
  -//        str = startElement.getNamespaceUri( "bar" );
  -//        Assert.assertTrue( str.equals( "bar.com" ) );
  -//        map = startElement.getNamespaceMap();
  -//        Assert.assertTrue( map.get( "bar" ).equals( "bar.com" ) );
  -//        
  -//        xev = endElement = (EndElement) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.END_ELEMENT );
  -//        Assert.assertTrue( xev.hasName() );
  -//        Assert.assertTrue( xev.isEndElement() );
  -//        assertName( endElement.getName(), "bar.com", "bar", "bar" );
  -//
  -//        xev = endPrefixMapping = (EndPrefixMapping) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.END_PREFIX_MAPPING );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( xev.isEndPrefixMapping() );
  -//        Assert.assertTrue( endPrefixMapping.getPrefix().equals( "bar" ) );
  -//
  -//        xev = comment = (Comment) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.COMMENT );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( comment.hasContent() );
  -//        Assert.assertTrue( comment.getContent().equals( " x " ) );
  -//        
  -//        xev = characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.CHARACTER_DATA );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( xev.isCharacterData() );
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "bar" ) );
  -//
  -//        xev = endElement = (EndElement) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.END_ELEMENT );
  -//        Assert.assertTrue( xev.hasName() );
  -//        Assert.assertTrue( xev.isEndElement() );
  -//        assertName( endElement.getName(), "default.com", "foo", null );
  -//
  -//        xev = cpm = (ChangePrefixMapping) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.CHANGE_PREFIX_MAPPING );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( xev.isChangePrefixMapping() );
  -//        Assert.assertTrue( cpm.getPrefix().length() == 0 );
  -//        Assert.assertTrue( cpm.getOldNamespaceUri().equals( "default.com" ) );
  -//        Assert.assertTrue( cpm.getNewNamespaceUri().equals( "" ) );
  -//
  -//        xev = endDocument = (EndDocument) xis.next();
  -//        Assert.assertTrue( xev.getType() == XMLEvent.END_DOCUMENT );
  -//        Assert.assertTrue( !xev.hasName() );
  -//        Assert.assertTrue( xev.isEndDocument() );
  -//        
  -//        xev = xis.next();
  -//        Assert.assertTrue( xev == null );
  -//
  -//        //
  -//        // Test ChangePrefixMapping event
  -//        //
  -//
  -//        o = XmlObject.Factory.parse( "<foo xmlns:x=\"y\"><bar xmlns:x=\"z\"/></foo>" );
  -//        c = o.newCursor();
  -//        xis = c.newXMLInputStream();
  -//        
  -//        startDocument = (StartDocument) xis.next();
  -//        
  -//        startPrefixMapping = (StartPrefixMapping) xis.next();
  -//        str = startPrefixMapping.getNamespaceUri();
  -//        Assert.assertTrue( str.equals( "y" ) );
  -//        Assert.assertTrue( startPrefixMapping.getPrefix().equals( "x" ) );
  -//        
  -//        startElement = (StartElement) xis.next();
  -//
  -//        startPrefixMapping = (StartPrefixMapping) xis.next();
  -//        str = startPrefixMapping.getNamespaceUri();
  -//        Assert.assertTrue( str.equals( "z" ) );
  -//        Assert.assertTrue( startPrefixMapping.getPrefix().equals( "x" ) );
  -//        
  -//        startElement = (StartElement) xis.next();
  -//        
  -//        endElement = (EndElement) xis.next();
  -//
  -//        cpm = (ChangePrefixMapping) xis.next();
  -//        str = cpm.getOldNamespaceUri();
  -//        Assert.assertTrue( str.equals( "z" ) );
  -//        str = cpm.getNewNamespaceUri();
  -//        Assert.assertTrue( str.equals( "y" ) );
  -//        str = cpm.getPrefix();
  -//        Assert.assertTrue( str.equals( "x" ) );
  -//
  -//        endElement = (EndElement) xis.next();
  -//        
  -//        endPrefixMapping = (EndPrefixMapping) xis.next();
  -//        Assert.assertTrue( endPrefixMapping.getPrefix().equals( "x" ) );
  -//
  -//        endDocument = (EndDocument) xis.next();
  -//        
  -//        xev = xis.next();
  -//        Assert.assertTrue( xev == null );
  -//
  -//        //
  -//        // Test CharacterData events
  -//        //
  -//
  -//        o = XmlObject.Factory.parse( "<foo>a<bar>b<baz>c</baz>d</bar>e</foo>" );
  -//        c = o.newCursor();
  -//        xis = c.newXMLInputStream();
  -//        
  -//        startDocument = (StartDocument) xis.next();
  -//
  -//        startElement = (StartElement) xis.next();
  -//
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "a" ) );
  -//
  -//        startElement = (StartElement) xis.next();
  -//        
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "b" ) );
  -//
  -//        startElement = (StartElement) xis.next();
  -//        
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "c" ) );
  -//
  -//        endElement = (EndElement) xis.next();
  -//        
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "d" ) );
  -//
  -//        endElement = (EndElement) xis.next();
  -//
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "e" ) );
  -//
  -//        endElement = (EndElement) xis.next();
  -//        
  -//        endDocument = (EndDocument) xis.next();
  -//        
  -//        xev = xis.next();
  -//        Assert.assertTrue( xev == null );
  -//
  -//        //
  -//        // Test SubStreams
  -//        //
  -//
  -//        o = XmlObject.Factory.parse( "<foo>a<bar>b<baz>c</baz>d</bar>e</foo>" );
  -//        c = o.newCursor();
  -//        xis = c.newXMLInputStream();
  -//        
  -//        startDocument = (StartDocument) xis.next();
  -//
  -//        startElement = (StartElement) xis.next();
  -//
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "a" ) );
  -//
  -//        startElement = (StartElement) xis.next();
  -//        
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "b" ) );
  -//
  -//            XMLInputStream xis2 = xis.getSubStream();
  -//
  -//        startElement = (StartElement) xis.next();
  -//        
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "c" ) );
  -//
  -//        endElement = (EndElement) xis.next();
  -//        
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "d" ) );
  -//
  -//            startElement = (StartElement) xis2.next();
  -//
  -//            characterData = (CharacterData) xis2.next();
  -//            Assert.assertTrue( characterData.hasContent() );
  -//            Assert.assertTrue( characterData.getContent().equals( "c" ) );
  -//
  -//            endElement = (EndElement) xis2.next();
  -//            
  -//            xev = xis2.next();
  -//            Assert.assertTrue( xev == null );
  -//            
  -//        endElement = (EndElement) xis.next();
  -//
  -//        characterData = (CharacterData) xis.next();
  -//        Assert.assertTrue( characterData.hasContent() );
  -//        Assert.assertTrue( characterData.getContent().equals( "e" ) );
  -//
  -//        endElement = (EndElement) xis.next();
  -//        
  -//        endDocument = (EndDocument) xis.next();
  -//        
  -//        xev = xis.next();
  -//        Assert.assertTrue( xev == null );
  -//    }
  +    public void testXMLStream ( )
  +        throws Exception
  +    {
  +        XmlObject o =
  +            XmlObject.Factory.parse(
  +                "<foo x=\"y\" xmlns=\"default.com\">" +
  +                    "<!-- x -->bar</foo>" );
  +        
  +        XmlCursor c = o.newCursor();
  +        
  +        c.toNextToken();
  +        c.toNextToken();
  +        c.toNextToken();
  +        c.toNextToken();
  +        
  +        c.insertElement( "bar", "bar.com" );
  +        
  +        c.toStartDoc();
  +
  +        XMLInputStream xis = c.newXMLInputStream();
  +
  +        XMLEvent xev;
  +        StartDocument startDocument;
  +        EndDocument endDocument;
  +        StartElement startElement;
  +        AttributeIterator attributeIterator;
  +        StartPrefixMapping startPrefixMapping;
  +        EndPrefixMapping endPrefixMapping;
  +        ChangePrefixMapping cpm;
  +        EndElement endElement;
  +        Attribute attribute;
  +        Comment comment;
  +        CharacterData characterData;
  +        XMLName name;
  +        String str;
  +        Map map;
  +        
  +        xev = startDocument = (StartDocument) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.START_DOCUMENT );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( startDocument.isStartDocument() );
  +        
  +        xev = startPrefixMapping = (StartPrefixMapping) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.START_PREFIX_MAPPING );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( xev.isStartPrefixMapping() );
  +        str = startPrefixMapping.getNamespaceUri();
  +        Assert.assertTrue( str.equals( "default.com" ) );
  +        Assert.assertTrue( startPrefixMapping.getPrefix().length() == 0 );
  +        
  +        xev = startElement = (StartElement) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.START_ELEMENT );
  +        Assert.assertTrue( xev.hasName() );
  +        Assert.assertTrue( xev.isStartElement() );
  +        assertName( startElement.getName(), "default.com", "foo", null );
  +        attributeIterator = startElement.getAttributes();
  +        attribute = attributeIterator.next();
  +        assertName( attribute.getName(), null, "x", null );
  +        Assert.assertTrue( attribute.getValue().equals( "y" ) );
  +        Assert.assertTrue( attributeIterator.next() == null );
  +        attributeIterator = startElement.getNamespaces();
  +        attribute = attributeIterator.next();
  +        assertName( attribute.getName(), null, "xmlns", null );
  +        Assert.assertTrue( attribute.getValue().equals( "default.com" ) );
  +        Assert.assertTrue( attributeIterator.next() == null );
  +        attributeIterator = startElement.getAttributesAndNamespaces();
  +        Assert.assertTrue( attributeIterator.next() != null );
  +        Assert.assertTrue( attributeIterator.next() != null );
  +        Assert.assertTrue( attributeIterator.next() == null );
  +        name = new XmlNameImpl( null, "x", null );
  +        attribute = startElement.getAttributeByName( name );
  +        Assert.assertTrue( attribute != null );
  +        Assert.assertTrue( attribute.getValue().equals( "y" ) );
  +        name = new XmlNameImpl( null, "xmlns", null );
  +        attribute = startElement.getAttributeByName( name );
  +        Assert.assertTrue( attribute == null );
  +        str = startElement.getNamespaceUri( null );
  +        Assert.assertTrue( str.equals( "default.com" ) );
  +
  +        xev = startPrefixMapping = (StartPrefixMapping) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.START_PREFIX_MAPPING );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( xev.isStartPrefixMapping() );
  +        str = startPrefixMapping.getNamespaceUri();
  +        Assert.assertTrue( str.equals( "bar.com" ) );
  +        Assert.assertTrue( startPrefixMapping.getPrefix().equals( "bar" ) );
  +        
  +        xev = startElement = (StartElement) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.START_ELEMENT );
  +        Assert.assertTrue( xev.hasName() );
  +        Assert.assertTrue( xev.isStartElement() );
  +        assertName( startElement.getName(), "bar.com", "bar", "bar" );
  +        attributeIterator = startElement.getAttributes();
  +        Assert.assertTrue( attributeIterator.next() == null );
  +        attributeIterator = startElement.getNamespaces();
  +        attribute = attributeIterator.next();
  +        assertName( attribute.getName(), null, "bar", "xmlns" );
  +        Assert.assertTrue( attribute.getValue().equals( "bar.com" ) );
  +        Assert.assertTrue( attributeIterator.next() == null );
  +        attributeIterator = startElement.getAttributesAndNamespaces();
  +        Assert.assertTrue( attributeIterator.next() != null );
  +        Assert.assertTrue( attributeIterator.next() == null );
  +        str = startElement.getNamespaceUri( "bar" );
  +        Assert.assertTrue( str.equals( "bar.com" ) );
  +        map = startElement.getNamespaceMap();
  +        Assert.assertTrue( map.get( "bar" ).equals( "bar.com" ) );
  +        
  +        xev = endElement = (EndElement) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.END_ELEMENT );
  +        Assert.assertTrue( xev.hasName() );
  +        Assert.assertTrue( xev.isEndElement() );
  +        assertName( endElement.getName(), "bar.com", "bar", "bar" );
  +
  +        xev = endPrefixMapping = (EndPrefixMapping) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.END_PREFIX_MAPPING );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( xev.isEndPrefixMapping() );
  +        Assert.assertTrue( endPrefixMapping.getPrefix().equals( "bar" ) );
  +
  +        xev = comment = (Comment) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.COMMENT );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( comment.hasContent() );
  +        Assert.assertTrue( comment.getContent().equals( " x " ) );
  +        
  +        xev = characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.CHARACTER_DATA );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( xev.isCharacterData() );
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "bar" ) );
  +
  +        xev = endElement = (EndElement) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.END_ELEMENT );
  +        Assert.assertTrue( xev.hasName() );
  +        Assert.assertTrue( xev.isEndElement() );
  +        assertName( endElement.getName(), "default.com", "foo", null );
  +
  +        xev = cpm = (ChangePrefixMapping) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.CHANGE_PREFIX_MAPPING );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( xev.isChangePrefixMapping() );
  +        Assert.assertTrue( cpm.getPrefix().length() == 0 );
  +        Assert.assertTrue( cpm.getOldNamespaceUri().equals( "default.com" ) );
  +        Assert.assertTrue( cpm.getNewNamespaceUri().equals( "" ) );
  +
  +        xev = endDocument = (EndDocument) xis.next();
  +        Assert.assertTrue( xev.getType() == XMLEvent.END_DOCUMENT );
  +        Assert.assertTrue( !xev.hasName() );
  +        Assert.assertTrue( xev.isEndDocument() );
  +        
  +        xev = xis.next();
  +        Assert.assertTrue( xev == null );
  +
  +        //
  +        // Test ChangePrefixMapping event
  +        //
  +
  +        o = XmlObject.Factory.parse( "<foo xmlns:x=\"y\"><bar xmlns:x=\"z\"/></foo>" );
  +        c = o.newCursor();
  +        xis = c.newXMLInputStream();
  +        
  +        startDocument = (StartDocument) xis.next();
  +        
  +        startPrefixMapping = (StartPrefixMapping) xis.next();
  +        str = startPrefixMapping.getNamespaceUri();
  +        Assert.assertTrue( str.equals( "y" ) );
  +        Assert.assertTrue( startPrefixMapping.getPrefix().equals( "x" ) );
  +        
  +        startElement = (StartElement) xis.next();
  +
  +        startPrefixMapping = (StartPrefixMapping) xis.next();
  +        str = startPrefixMapping.getNamespaceUri();
  +        Assert.assertTrue( str.equals( "z" ) );
  +        Assert.assertTrue( startPrefixMapping.getPrefix().equals( "x" ) );
  +        
  +        startElement = (StartElement) xis.next();
  +        
  +        endElement = (EndElement) xis.next();
  +
  +        cpm = (ChangePrefixMapping) xis.next();
  +        str = cpm.getOldNamespaceUri();
  +        Assert.assertTrue( str.equals( "z" ) );
  +        str = cpm.getNewNamespaceUri();
  +        Assert.assertTrue( str.equals( "y" ) );
  +        str = cpm.getPrefix();
  +        Assert.assertTrue( str.equals( "x" ) );
  +
  +        endElement = (EndElement) xis.next();
  +        
  +        endPrefixMapping = (EndPrefixMapping) xis.next();
  +        Assert.assertTrue( endPrefixMapping.getPrefix().equals( "x" ) );
  +
  +        endDocument = (EndDocument) xis.next();
  +        
  +        xev = xis.next();
  +        Assert.assertTrue( xev == null );
  +
  +        //
  +        // Test CharacterData events
  +        //
  +
  +        o = XmlObject.Factory.parse( "<foo>a<bar>b<baz>c</baz>d</bar>e</foo>" );
  +        c = o.newCursor();
  +        xis = c.newXMLInputStream();
  +        
  +        startDocument = (StartDocument) xis.next();
  +
  +        startElement = (StartElement) xis.next();
  +
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "a" ) );
  +
  +        startElement = (StartElement) xis.next();
  +        
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "b" ) );
  +
  +        startElement = (StartElement) xis.next();
  +        
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "c" ) );
  +
  +        endElement = (EndElement) xis.next();
  +        
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "d" ) );
  +
  +        endElement = (EndElement) xis.next();
  +
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "e" ) );
  +
  +        endElement = (EndElement) xis.next();
  +        
  +        endDocument = (EndDocument) xis.next();
  +        
  +        xev = xis.next();
  +        Assert.assertTrue( xev == null );
  +
  +        //
  +        // Test SubStreams
  +        //
  +
  +        o = XmlObject.Factory.parse( "<foo>a<bar>b<baz>c</baz>d</bar>e</foo>" );
  +        c = o.newCursor();
  +        xis = c.newXMLInputStream();
  +        
  +        startDocument = (StartDocument) xis.next();
  +
  +        startElement = (StartElement) xis.next();
  +
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "a" ) );
  +
  +        startElement = (StartElement) xis.next();
  +        
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "b" ) );
  +
  +            XMLInputStream xis2 = xis.getSubStream();
  +
  +        startElement = (StartElement) xis.next();
  +        
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "c" ) );
  +
  +        endElement = (EndElement) xis.next();
  +        
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "d" ) );
  +
  +            startElement = (StartElement) xis2.next();
  +
  +            characterData = (CharacterData) xis2.next();
  +            Assert.assertTrue( characterData.hasContent() );
  +            Assert.assertTrue( characterData.getContent().equals( "c" ) );
  +
  +            endElement = (EndElement) xis2.next();
  +            
  +            xev = xis2.next();
  +            Assert.assertTrue( xev == null );
  +            
  +        endElement = (EndElement) xis.next();
  +
  +        characterData = (CharacterData) xis.next();
  +        Assert.assertTrue( characterData.hasContent() );
  +        Assert.assertTrue( characterData.getContent().equals( "e" ) );
  +
  +        endElement = (EndElement) xis.next();
  +        
  +        endDocument = (EndDocument) xis.next();
  +        
  +        xev = xis.next();
  +        Assert.assertTrue( xev == null );
  +    }
   // NEWSTORE END
       
       private XmlCursor navDoc ( XmlObject x, String dirs )
  @@ -1598,8 +1598,8 @@
           cFrom = navDoc( x, "d" );
           cTo = navNewCursor( cFrom, "" );
   // NEWSTORE START
  -        Assert.assertTrue( cFrom.moveXml( cTo ) );
  -//        Assert.assertTrue( !cFrom.moveXml( cTo ) );
  +//        Assert.assertTrue( cFrom.moveXml( cTo ) );
  +        Assert.assertTrue( !cFrom.moveXml( cTo ) );
   // NEWSTORE END
           cFrom.insertChars( "[FROM]" );
           cTo.insertChars( "[TO]" );
  @@ -1611,12 +1611,12 @@
               new QName( null, "bar" ) );
   
   // NEWSTORE START
  -        Assert.assertTrue(
  -            x.xmlText( options ).equals( "<bar>[TO]<foo>abcdef</foo>[FROM]</bar>" ) ||
  -                x.xmlText( options ).equals( "<bar>[FROM]<foo>abcdef</foo>[TO]</bar>" ) );
   //        Assert.assertTrue(
  -//            x.xmlText( options ).equals( "<bar>[FROM][TO]<foo>abcdef</foo></bar>" ) ||
  -//                x.xmlText( options ).equals( "<bar>[TO][FROM]<foo>abcdef</foo></bar>" ) );
  +//            x.xmlText( options ).equals( "<bar>[TO]<foo>abcdef</foo>[FROM]</bar>" ) ||
  +//                x.xmlText( options ).equals( "<bar>[FROM]<foo>abcdef</foo>[TO]</bar>" ) );
  +        Assert.assertTrue(
  +            x.xmlText( options ).equals( "<bar>[FROM][TO]<foo>abcdef</foo></bar>" ) ||
  +                x.xmlText( options ).equals( "<bar>[TO][FROM]<foo>abcdef</foo></bar>" ) );
   // NEWSTORE END
           
           //
  @@ -1626,17 +1626,17 @@
           cFrom = navDoc( x, "d" );
           cTo = navNewCursor( cFrom, "ttt" );
   // NEWSTORE START
  -        Assert.assertTrue( cFrom.moveXml( cTo ) );
  -//        Assert.assertTrue( !cFrom.moveXml( cTo ) );
  +//        Assert.assertTrue( cFrom.moveXml( cTo ) );
  +        Assert.assertTrue( !cFrom.moveXml( cTo ) );
   // NEWSTORE END
           cFrom.insertChars( "[FROM]" );
           cTo.insertChars( "[TO]" );
   
           Assert.assertTrue(
   // NEWSTORE START
  -            x.xmlText( options ).equals( "<bar><foo>abcdef</foo>[FROM][TO]</bar>" ) ||
  -                x.xmlText( options ).equals( "<bar><foo>abcdef</foo>[TO][FROM]</bar>" ) );
  -//            x.xmlText( options ).equals( "<bar>[FROM]<foo>abcdef</foo>[TO]</bar>" ) );
  +//            x.xmlText( options ).equals( "<bar><foo>abcdef</foo>[FROM][TO]</bar>" ) ||
  +//                x.xmlText( options ).equals( "<bar><foo>abcdef</foo>[TO][FROM]</bar>" ) );
  +            x.xmlText( options ).equals( "<bar>[FROM]<foo>abcdef</foo>[TO]</bar>" ) );
   // NEWSTORE END
           
           //
  @@ -2306,18 +2306,18 @@
       }
   
   // NEWSTORE START
  -//    public void testAnnotation ( )
  -//        throws Exception
  -//    {
  -//        XmlObject x = XmlObject.Factory.parse( "<foo/>" );
  -//        XmlCursor c = x.newCursor();
  -//        c.toNextToken();
  -//        MyAnno a = new MyAnno();
  -//        c.setBookmark( a );
  -//        Assert.assertTrue( c.removeXml() );
  -//        XmlCursor c2 = a.createCursor();
  -//        Assert.assertTrue( c2 == null );
  -//    }
  +    public void testAnnotation ( )
  +        throws Exception
  +    {
  +        XmlObject x = XmlObject.Factory.parse( "<foo/>" );
  +        XmlCursor c = x.newCursor();
  +        c.toNextToken();
  +        MyAnno a = new MyAnno();
  +        c.setBookmark( a );
  +        Assert.assertTrue( c.removeXml() );
  +        XmlCursor c2 = a.createCursor();
  +        Assert.assertTrue( c2 == null );
  +    }
   // NEWSTORE END
       
       public void testAttrSetter ( )
  @@ -2619,8 +2619,8 @@
   
           // 'a' prefix namespace is not remapped
   // NEWSTORE START
  -        String expect = "<a xmlns:a=\"aNS\" xmlns:b=\"bNS\" xmlns:c=\"cNS\"><a:b/></a>";
  -//        String expect = "<a xmlns:c=\"cNS\" xmlns:b=\"bNS\" xmlns:a=\"aNS\"><a:b/></a>";
  +//        String expect = "<a xmlns:a=\"aNS\" xmlns:b=\"bNS\" xmlns:c=\"cNS\"><a:b/></a>";
  +        String expect = "<a xmlns:c=\"cNS\" xmlns:b=\"bNS\" xmlns:a=\"aNS\"><a:b/></a>";
   // NEWSTORE END
   
           xml = "<a xmlns='aNS'><b/></a>";
  @@ -2637,36 +2637,36 @@
   
           // default namespace is not remapped
   // NEWSTORE START
  -        expect = "<a xmlns=\"aNS\" xmlns:b=\"bNS\" xmlns:c=\"cNS\"><b/></a>";
  -//        expect = "<a xmlns:c=\"cNS\" xmlns:b=\"bNS\" xmlns=\"aNS\"><b/></a>";
  +//        expect = "<a xmlns=\"aNS\" xmlns:b=\"bNS\" xmlns:c=\"cNS\"><b/></a>";
  +        expect = "<a xmlns:c=\"cNS\" xmlns:b=\"bNS\" xmlns=\"aNS\"><b/></a>";
   // NEWSTORE END
           Assert.assertEquals( expect, x.xmlText() );
   
       }
   
   // NEWSTORE START
  -//    public void testCR135193()
  -//        throws Exception
  -//    {
  -//        String xml = "<a xmlns='aNS' xmlns:b='bNS'><b><c/></b></a>";
  -//
  -//        XmlObject x = XmlObject.Factory.parse(xml);
  -//
  -//        // get an XMLInputStream and move to XMLEvent.START_ELEMENT for 'b'
  -//        XmlCursor c = x.newCursor();
  -//        XMLInputStream xis = c.newXMLInputStream();
  -//        c.dispose();
  -//        while (xis.hasNext() && xis.next().getType() != XMLEvent.START_ELEMENT) {
  -//        }
  -//
  -//        // reparse from 'b' element using an sub-XMLInputStream
  -//        XMLInputStream xis1 = xis.getSubStream();
  -//        XmlObject x1 = XmlObject.Factory.parse(xis1);
  -//
  -//        // CR135193: namespaces including default are set on the 'b' child
  -//        String expect = "<b xmlns=\"aNS\" xmlns:b=\"bNS\"><c/></b>";
  -//        Assert.assertEquals( expect, x1.xmlText() );
  -//    }
  +    public void testCR135193()
  +        throws Exception
  +    {
  +        String xml = "<a xmlns='aNS' xmlns:b='bNS'><b><c/></b></a>";
  +
  +        XmlObject x = XmlObject.Factory.parse(xml);
  +
  +        // get an XMLInputStream and move to XMLEvent.START_ELEMENT for 'b'
  +        XmlCursor c = x.newCursor();
  +        XMLInputStream xis = c.newXMLInputStream();
  +        c.dispose();
  +        while (xis.hasNext() && xis.next().getType() != XMLEvent.START_ELEMENT) {
  +        }
  +
  +        // reparse from 'b' element using an sub-XMLInputStream
  +        XMLInputStream xis1 = xis.getSubStream();
  +        XmlObject x1 = XmlObject.Factory.parse(xis1);
  +
  +        // CR135193: namespaces including default are set on the 'b' child
  +        String expect = "<b xmlns=\"aNS\" xmlns:b=\"bNS\"><c/></b>";
  +        Assert.assertEquals( expect, x1.xmlText() );
  +    }
   // NEWSTORE END
   
   }
  
  
  
  1.5       +6 -6      xml-xmlbeans/v2/test/src/xmlcursor/checkin/ToFirstContentTokenTest.java
  
  Index: ToFirstContentTokenTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/checkin/ToFirstContentTokenTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ToFirstContentTokenTest.java	16 Aug 2004 15:58:27 -0000	1.4
  +++ ToFirstContentTokenTest.java	16 Aug 2004 17:52:55 -0000	1.5
  @@ -75,12 +75,12 @@
           assertEquals(TokenType.NAMESPACE, m_xc.currentTokenType());
   
   // NEWSTORE START
  -        assertEquals(m_xc.getTextValue(),"nsuri");
  -//        try {
  -//            m_xc.getTextValue();
  -//            fail("Expecting Illegal State Exception");
  -//        } catch (IllegalStateException ie) {
  -//        }
  +//        assertEquals(m_xc.getTextValue(),"nsuri");
  +        try {
  +            m_xc.getTextValue();
  +            fail("Expecting Illegal State Exception");
  +        } catch (IllegalStateException ie) {
  +        }
   // NEWSTORE END
       }
   
  
  
  
  1.5       +5 -5      xml-xmlbeans/v2/test/src/xmlcursor/xpath/jaxen/checkin/JaxenXPathTests.java
  
  Index: JaxenXPathTests.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/xpath/jaxen/checkin/JaxenXPathTests.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JaxenXPathTests.java	16 Aug 2004 15:58:28 -0000	1.4
  +++ JaxenXPathTests.java	16 Aug 2004 17:52:56 -0000	1.5
  @@ -53,11 +53,11 @@
       public void testConformance() throws Exception {
   // EricVas: I'm not implementing Jaxen in V2's newstore ... need to find a replacement for Jaxen
   // NEWSTORE START
  -//        XmlObject doc = null;
  -//
  -//        doc = XmlObject.Factory.parse(sXml);
  -//
  -//        runAll(doc, xpath);
  +        XmlObject doc = null;
  +
  +        doc = XmlObject.Factory.parse(sXml);
  +
  +        runAll(doc, xpath);
   // NEWSTORE END
       }
   
  
  
  
  1.6       +4 -4      xml-xmlbeans/v2/test/src/xmlobject/checkin/AssortedTests.java
  
  Index: AssortedTests.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlobject/checkin/AssortedTests.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AssortedTests.java	16 Aug 2004 15:58:28 -0000	1.5
  +++ AssortedTests.java	16 Aug 2004 17:52:56 -0000	1.6
  @@ -46,15 +46,15 @@
           // valid chars
           cur.setTextValue("<something or other:\u03C0\uD7FF>");
   // NEWSTORE START
  -        Assert.assertEquals("<test>&lt;something or other:\u03C0\uD7FF></test>", xdoc.toString());
  -//        Assert.assertEquals("<test>&lt;something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
  +//        Assert.assertEquals("<test>&lt;something or other:\u03C0\uD7FF></test>", xdoc.toString());
  +        Assert.assertEquals("<test>&lt;something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
   // NEWSTORE END
           
           // invalid chars - control chars, unicode surrogates, FFFF/FFFE, etc
           cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
   // NEWSTORE START
  -        Assert.assertEquals("<test>&lt;something?or?other:\u0045?????\u03C0\uD7FF?></test>", xdoc.toString());
  -//        Assert.assertEquals("<test>&lt;something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
  +//        Assert.assertEquals("<test>&lt;something?or?other:\u0045?????\u03C0\uD7FF?></test>", xdoc.toString());
  +        Assert.assertEquals("<test>&lt;something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
   // NEWSTORE END
       }
       
  
  
  
  1.6       +71 -71    xml-xmlbeans/v2/test/src/xmlobject/checkin/InstanceValidationTests.java
  
  Index: InstanceValidationTests.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlobject/checkin/InstanceValidationTests.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InstanceValidationTests.java	16 Aug 2004 15:58:28 -0000	1.5
  +++ InstanceValidationTests.java	16 Aug 2004 17:52:56 -0000	1.6
  @@ -557,16 +557,16 @@
               File[] schemasF = { schemeFile, xmlFile };
   
   // NEWSTORE START
  -            stl = makeSchemaTypeLoader( schemasF );
  -//            Root.disableStoreValidation();
  -//            try
  -//            {
  -//                stl = makeSchemaTypeLoader( schemasF );
  -//            }
  -//            finally
  -//            {
  -//                Root.enableStoreValidation();
  -//            }
  +//            stl = makeSchemaTypeLoader( schemasF );
  +            Root.disableStoreValidation();
  +            try
  +            {
  +                stl = makeSchemaTypeLoader( schemasF );
  +            }
  +            finally
  +            {
  +                Root.enableStoreValidation();
  +            }
   // NEWSTORE END
   
               SchemaType type =
  @@ -1246,67 +1246,67 @@
           }
   
   // NEWSTORE START
  -//        public void testValidate4 ( )
  -//            throws Exception
  -//        {
  -//            String schema =
  -//                "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>\n" +
  -//                "\n" +
  -//                "  <xs:element name='any'>\n" +
  -//                "  </xs:element>\n" +
  -//                "\n" +
  -//                "  <xs:simpleType name='kindaPrime'>\n" +
  -//                "    <xs:restriction base='xs:decimal'>\n" +
  -//                "      <xs:pattern value='[0-9]*[13579]'/>\n" +
  -//                "      <xs:enumeration value='3'/>\n" +
  -//                "      <xs:enumeration value='5'/>\n" +
  -//                "      <xs:enumeration value='7'/>\n" +
  -//                "      <xs:enumeration value='11'/>\n" +
  -//                "      <xs:enumeration value='13'/>\n" +
  -//                "      <xs:enumeration value='17'/>\n" +
  -//                "      <xs:enumeration value='19'/>\n" +
  -//                "    </xs:restriction>\n" +
  -//                "  </xs:simpleType>\n" +
  -//                "\n" +
  -//                "</xs:schema>\n" +
  -//                "";
  -//
  -//            String[] schemas = { schema };
  -//
  -//            SchemaTypeLoader stl = makeSchemaTypeLoader( schemas );
  -//
  -//            XmlObject x =
  -//                stl.parse(
  -//                    "<any " + ns + " xsi:type='kindaPrime'>100</any>",
  -//                    null, null );
  -//
  -//            // Make sure the unvalidated stream is OK
  -//
  -//            XMLInputStream xis = x.newXMLInputStream();
  -//
  -//            while ( xis.hasNext() )
  -//                xis.next();
  -//
  -//            // Make sure the validated stream fails
  -//
  -//            boolean blewChunks = false;
  -//
  -//            xis =
  -//                stl.newValidatingXMLInputStream(
  -//                    x.newXMLInputStream(), null, null );
  -//
  -//            try
  -//            {
  -//                while ( xis.hasNext() )
  -//                    xis.next();
  -//            }
  -//            catch ( XMLStreamValidationException e )
  -//            {
  -//                blewChunks = true;
  -//            }
  -//
  -//            Assert.assertTrue( blewChunks );
  -//        }
  +        public void testValidate4 ( )
  +            throws Exception
  +        {
  +            String schema =
  +                "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>\n" +
  +                "\n" +
  +                "  <xs:element name='any'>\n" +
  +                "  </xs:element>\n" +
  +                "\n" +
  +                "  <xs:simpleType name='kindaPrime'>\n" +
  +                "    <xs:restriction base='xs:decimal'>\n" +
  +                "      <xs:pattern value='[0-9]*[13579]'/>\n" +
  +                "      <xs:enumeration value='3'/>\n" +
  +                "      <xs:enumeration value='5'/>\n" +
  +                "      <xs:enumeration value='7'/>\n" +
  +                "      <xs:enumeration value='11'/>\n" +
  +                "      <xs:enumeration value='13'/>\n" +
  +                "      <xs:enumeration value='17'/>\n" +
  +                "      <xs:enumeration value='19'/>\n" +
  +                "    </xs:restriction>\n" +
  +                "  </xs:simpleType>\n" +
  +                "\n" +
  +                "</xs:schema>\n" +
  +                "";
  +
  +            String[] schemas = { schema };
  +
  +            SchemaTypeLoader stl = makeSchemaTypeLoader( schemas );
  +
  +            XmlObject x =
  +                stl.parse(
  +                    "<any " + ns + " xsi:type='kindaPrime'>100</any>",
  +                    null, null );
  +
  +            // Make sure the unvalidated stream is OK
  +
  +            XMLInputStream xis = x.newXMLInputStream();
  +
  +            while ( xis.hasNext() )
  +                xis.next();
  +
  +            // Make sure the validated stream fails
  +
  +            boolean blewChunks = false;
  +
  +            xis =
  +                stl.newValidatingXMLInputStream(
  +                    x.newXMLInputStream(), null, null );
  +
  +            try
  +            {
  +                while ( xis.hasNext() )
  +                    xis.next();
  +            }
  +            catch ( XMLStreamValidationException e )
  +            {
  +                blewChunks = true;
  +            }
  +
  +            Assert.assertTrue( blewChunks );
  +        }
   // NEWSTORE END
   
           public void testValidate5 ( )
  
  
  
  1.5       +8 -8      xml-xmlbeans/v2/test/src/xmlobject/checkin/SelectChldAttTests.java
  
  Index: SelectChldAttTests.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlobject/checkin/SelectChldAttTests.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SelectChldAttTests.java	16 Aug 2004 15:58:28 -0000	1.4
  +++ SelectChldAttTests.java	16 Aug 2004 17:52:56 -0000	1.5
  @@ -124,8 +124,8 @@
           Assert.assertTrue("8     selectAttributes set'##other' : ",
               verifyResult(xos[0].selectAttributes(QNameSet.forWildcardNamespaceString("##other", uri)),
   // NEWSTORE START
  -            new String[]{"<xml-fragment xmlns:p=\"uri:other_namespace\">attribute in #other namespace</xml-fragment>"}));
  -//            new String[]{"<xml-fragment>attribute in #other namespace</xml-fragment>"}));
  +//            new String[]{"<xml-fragment xmlns:p=\"uri:other_namespace\">attribute in #other namespace</xml-fragment>"}));
  +            new String[]{"<xml-fragment>attribute in #other namespace</xml-fragment>"}));
   // NEWSTORE END
   
           // elemC
  @@ -165,17 +165,17 @@
           Assert.assertTrue("12a    selectChildren in the any bucket for typeExtendedC: ",
               verifyResult(xos[0].selectAttributes(qnsb.toQNameSet()),
   // NEWSTORE START
  -            new String[]{"<xml-fragment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:p=\"uri_other_namespace\">attribute in any bucket</xml-fragment>"}));
  -//            new String[]{"<xml-fragment>attribute in any bucket</xml-fragment>"}));
  +//            new String[]{"<xml-fragment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:p=\"uri_other_namespace\">attribute in any bucket</xml-fragment>"}));
  +            new String[]{"<xml-fragment>attribute in any bucket</xml-fragment>"}));
   // NEWSTORE END
           //print("12b    selectChildren in the any bucket for typeExtendedC: " , xos[0].selectAttributes(TypeExtendedC.type.qnameSetForWildcardAttributes()));
           Assert.assertTrue("12b    selectChildren in the any bucket for typeExtendedC: ",
               verifyResult(xos[0].selectAttributes(TypeExtendedC.type.qnameSetForWildcardAttributes()),
   // NEWSTORE START
  -            new String[]{"<xml-fragment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:p=\"uri_other_namespace\">typeExtendedC</xml-fragment>",
  -            "<xml-fragment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:p=\"uri_other_namespace\">attribute in any bucket</xml-fragment>"}));
  -//            new String[]{"<xml-fragment>typeExtendedC</xml-fragment>",
  -//            "<xml-fragment>attribute in any bucket</xml-fragment>"}));
  +//            new String[]{"<xml-fragment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:p=\"uri_other_namespace\">typeExtendedC</xml-fragment>",
  +//            "<xml-fragment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:p=\"uri_other_namespace\">attribute in any bucket</xml-fragment>"}));
  +            new String[]{"<xml-fragment>typeExtendedC</xml-fragment>",
  +            "<xml-fragment>attribute in any bucket</xml-fragment>"}));
   // NEWSTORE END
       }
   
  
  
  
  1.5       +3 -3      xml-xmlbeans/v2/test/src/xmlobject/extensions/interfaceFeature/methodNameCollision/checkin/NameCollisionTest.java
  
  Index: NameCollisionTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlobject/extensions/interfaceFeature/methodNameCollision/checkin/NameCollisionTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NameCollisionTest.java	16 Aug 2004 15:58:29 -0000	1.4
  +++ NameCollisionTest.java	16 Aug 2004 17:52:57 -0000	1.5
  @@ -49,9 +49,9 @@
                        it[i].setAge(50);
                       it[i].setName4("BEAN Name"+i);
   // NEWSTORE START
  -                      sExpected.append("<consultant age=\"50\" name=\"BEAN Name"+i+"\"/>");
  -//                      sExpected.append("<consultant name=\"BEAN Name"+i+"\" " +
  -//                              "age=\"50\"/>");
  +//                      sExpected.append("<consultant age=\"50\" name=\"BEAN Name"+i+"\"/>");
  +                      sExpected.append("<consultant name=\"BEAN Name"+i+"\" " +
  +                              "age=\"50\"/>");
   // NEWSTORE END
                 }
   
  
  
  

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


Mime
View raw message