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/erictest EricTest.java
Date Wed, 17 Mar 2004 05:43:15 GMT
ericvas     2004/03/16 21:43:15

  Modified:    v2/src/xmlpublic/org/apache/xmlbeans FilterXmlObject.java
               v2/test/src/ericschema ericschema.xsd
               v2/test/src/erictest EricTest.java
  Log:
  Fix build break .. added getDomNode to FilterXmlObjewct
  
  Revision  Changes    Path
  1.5       +5 -0      xml-xmlbeans/v2/src/xmlpublic/org/apache/xmlbeans/FilterXmlObject.java
  
  Index: FilterXmlObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/xmlpublic/org/apache/xmlbeans/FilterXmlObject.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FilterXmlObject.java	12 Feb 2004 20:06:27 -0000	1.4
  +++ FilterXmlObject.java	17 Mar 2004 05:43:15 -0000	1.5
  @@ -192,6 +192,11 @@
           return underlyingXmlObject().newDomNode();
       }
   
  +    public Node getDomNode()
  +    {
  +        return underlyingXmlObject().getDomNode();
  +    }
  +
       public void save(ContentHandler ch, LexicalHandler lh) throws SAXException
       {
           underlyingXmlObject().save(ch, lh);
  
  
  
  1.2       +11 -3     xml-xmlbeans/v2/test/src/ericschema/ericschema.xsd
  
  Index: ericschema.xsd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/ericschema/ericschema.xsd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ericschema.xsd	26 Sep 2003 21:23:41 -0000	1.1
  +++ ericschema.xsd	17 Mar 2004 05:43:15 -0000	1.2
  @@ -1,8 +1,16 @@
   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  -	<xs:element name="asdasd">
  +	<xs:element name="Elem">
   		<xs:complexType>
  -			<xs:sequence>
  -			</xs:sequence>
  +  		  <xs:sequence>
  +            <xs:element name="Field">
  +              <xs:simpleType>
  +                <xs:restriction base="xs:string">
  +                    <xs:enumeration value="abc" />
  +                    <xs:enumeration value="xyz" />
  +                </xs:restriction>
  +              </xs:simpleType>
  +            </xs:element>
  +  		  </xs:sequence>
   		</xs:complexType>
   	</xs:element>
   </xs:schema>
  
  
  
  1.39      +18 -12    xml-xmlbeans/v2/test/src/erictest/EricTest.java
  
  Index: EricTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/erictest/EricTest.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- EricTest.java	16 Mar 2004 21:57:42 -0000	1.38
  +++ EricTest.java	17 Mar 2004 05:43:15 -0000	1.39
  @@ -34,6 +34,7 @@
   import org.apache.xmlbeans.XmlCursor.XmlBookmark;
   import org.apache.xmlbeans.XmlCursor;
   import org.apache.xmlbeans.GDateBuilder;
  +import org.apache.xmlbeans.SimpleValue;
   import org.apache.xmlbeans.XmlDate;
   import org.apache.xmlbeans.XmlDocumentProperties;
   import org.apache.xmlbeans.XmlError;
  @@ -102,25 +103,30 @@
   
   import org.apache.xmlbeans.impl.newstore2.Public2;
   
  +import noNamespace.*;
  +import noNamespace.ElemDocument.Elem;
  +
   public class EricTest
   {
       public static void main ( String[] args ) throws Exception
       {
  -        XmlOptions pp = new XmlOptions();
  -        pp.setSavePrettyPrint();
  -        
  -        XmlCursor c = Public2.newStore();
  +        XmlOptions options = new XmlOptions();
  +        options.setValidateOnSet();
   
  -        c.toNextToken();
  -        c.beginElement( "a" );
  -        c.insertChars( "xyz" );
  -        c.beginElement( "b" );
  +        Elem e = Elem.Factory.newInstance();
   
  -        c.toStartDoc();
  +        System.out.println( e.getField() );
   
  -        System.out.println( Public2.save( c.getDomNode() ) );
  -
  -        System.out.println( "\"" + Public2.save( c, pp ) + "\"" );
  +        try
  +        {
  +            e.setField( null );
  +        }
  +        catch ( Throwable ee )
  +        {
  +            ee.printStackTrace( System.out );
  +        }
  +        
  +        System.out.println( e.getField() );
       }
   }
   
  
  
  

---------------------------------------------------------------------
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