Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.SchemaTypeLoader.findDocumentType()


        XmlOptions options = new XmlOptions();

        if (docType != null)
        {
            SchemaType docSchema = stl.findDocumentType( docType );

            Assert.assertTrue( docSchema != null );
           
            options.put( XmlOptions.DOCUMENT_TYPE, docSchema );
        }
View Full Code Here


        {
            Root.enableStoreValidation();
        }

        SchemaType type =
            stl.findDocumentType(
                new QName( "http://www.w3.org/2001/XMLSchema", "schema" ) );

        Assert.assertTrue( type != null );

View Full Code Here

    {
        File inputfile1 = TestEnv.xbeanCase("schema/dynamic/dyntest.xsd");
        SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[] { XmlObject.Factory.parse(inputfile1) });
        XmlObject result = loader.parse(TestEnv.xbeanCase("schema/dynamic/dyntest.xml"), null, null);
        Assert.assertEquals("D=wrappedinstance@http://openuri.org/test/dyntest", result.schemaType().toString());
        Assert.assertEquals(loader.findDocumentType(new QName("http://openuri.org/test/dyntest", "wrappedinstance" )),
                            result.schemaType());
    }

    public void testDynamicLoad2() throws Throwable
    {
View Full Code Here

    {
        File inputfile1 = TestEnv.xbeanCase("schema/dynamic/dyntest2.xsd");
        SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[] { XmlObject.Factory.parse(inputfile1) });
        XmlObject result = loader.parse(TestEnv.xbeanCase("schema/dynamic/dyntest2.xml"), null, null);
        Assert.assertEquals("D=wrappedwildcard@http://openuri.org/test/dyntest", result.schemaType().toString());
        Assert.assertEquals(loader.findDocumentType(new QName("http://openuri.org/test/dyntest", "wrappedwildcard")),
                            result.schemaType());
        XmlCursor cur = result.newCursor();
        Assert.assertTrue("Should have a root element", cur.toFirstChild());
        result = cur.getObject();
        Assert.assertEquals("E=wrappedwildcard|D=wrappedwildcard@http://openuri.org/test/dyntest", result.schemaType().toString());
View Full Code Here

            {
                for (int i = 0; i < ITERATION_COUNT; i++)
                {
                    SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[] { XmlObject.Factory.parse(TestEnv.xbeanCase("schema/XmlSignature/xmldsig-core-schema.xsd")) });
                    XmlObject result = loader.parse(TestEnv.xbeanCase("schema/XmlSignature/signature-example.xml"), null, null);
                    Assert.assertEquals(loader.findDocumentType(new QName("http://www.w3.org/2000/09/xmldsig#", "Signature")), result.schemaType());
                }
                _result = true;
            }
            catch (Throwable t)
            {
View Full Code Here

        XmlOptions options = new XmlOptions();

        if (docType != null)
        {
            SchemaType docSchema = stl.findDocumentType( docType );

            Assert.assertTrue( docSchema != null );
           
            options.put( XmlOptions.DOCUMENT_TYPE, docSchema );
        }
View Full Code Here

        {
            Root.enableStoreValidation();
        }

        SchemaType type =
            stl.findDocumentType(
                new QName( "http://www.w3.org/2001/XMLSchema", "schema" ) );

        Assert.assertTrue( type != null );

View Full Code Here

        XmlOptions options = new XmlOptions();

        if (docType != null)
        {
            SchemaType docSchema = stl.findDocumentType( docType );

            Assert.assertTrue( docSchema != null );
           
            options.put( XmlOptions.DOCUMENT_TYPE, docSchema );
        }
View Full Code Here

        {
            Root.enableStoreValidation();
        }

        SchemaType type =
            stl.findDocumentType(
                new QName( "http://www.w3.org/2001/XMLSchema", "schema" ) );

        Assert.assertTrue( type != null );

View Full Code Here

    {
        File inputfile1 = TestEnv.xbeanCase("schema/dynamic/dyntest.xsd");
        SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[] { XmlObject.Factory.parse(inputfile1) });
        XmlObject result = loader.parse(TestEnv.xbeanCase("schema/dynamic/dyntest.xml"), null, null);
        Assert.assertEquals("D=wrappedinstance@http://openuri.org/test/dyntest", result.schemaType().toString());
        Assert.assertEquals(loader.findDocumentType(new QName("http://openuri.org/test/dyntest", "wrappedinstance" )),
                            result.schemaType());
    }

    public void testDynamicLoad2() throws Throwable
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.