Package org.eclipse.sapphire.modeling.xml.schema

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlContentModel$InsertionPosition


                    final Element root = domElement.getOwnerDocument().getDocumentElement();
                    root.setAttribute( xmlnsAttrName, namespace );
                   
                    if( ! namespace.equals( "http://www.w3.org/2001/XMLSchema-instance" ) )
                    {
                        final XmlContentModel xmlContentModel = getContentModel();
                        String schemaLocation = null;
                       
                        if( xmlContentModel != null )
                        {
                            schemaLocation = xmlContentModel.getSchema().getSchemaLocation( namespace );
                        }
                       
                        addSchemaLocation( namespace, schemaLocation );
                    }
                }
View Full Code Here


        assertEquals( "shape", ( (XmlElementDefinition) nestedContent.get( 0 ) ).getName().getLocalPart() );
        assertEquals( "aaa", ( (XmlElementDefinition) nestedContent.get( 1 ) ).getName().getLocalPart() );
        assertEquals( "bbb", ( (XmlElementDefinition) nestedContent.get( 2 ) ).getName().getLocalPart() );
        assertEquals( "ccc", ( (XmlElementDefinition) nestedContent.get( 3 ) ).getName().getLocalPart() );

        final XmlContentModel circleContentModel = rootContentModel.findChildElementContentModel(new QName( SCHEMA_LOCATION, "circle" ));
        assertNotNull(circleContentModel);
        final XmlContentModel squareContentModel = rootContentModel.findChildElementContentModel(new QName( SCHEMA_LOCATION, "square" ));
        assertNotNull(squareContentModel);
    }
View Full Code Here

        assertEquals( "x", ( (XmlElementDefinition) rectangleNestedContent.get( 0 ) ).getName().getLocalPart() );
        assertEquals( "y", ( (XmlElementDefinition) rectangleNestedContent.get( 1 ) ).getName().getLocalPart() );
        assertEquals( "width", ( (XmlElementDefinition) rectangleNestedContent.get( 2 ) ).getName().getLocalPart() );
        assertEquals( "height", ( (XmlElementDefinition) rectangleNestedContent.get( 3 ) ).getName().getLocalPart() );
       
        final XmlContentModel foundCircleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "circle" ) );
        assertNotNull( foundCircleContentModel );
       
        final XmlContentModel foundRectangleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "rectangle" ) );
        assertNotNull( foundRectangleContentModel );
    }
View Full Code Here

        assertEquals( "x", ( (XmlElementDefinition) rectangleNestedContent.get( 0 ) ).getName().getLocalPart() );
        assertEquals( "y", ( (XmlElementDefinition) rectangleNestedContent.get( 1 ) ).getName().getLocalPart() );
        assertEquals( "width", ( (XmlElementDefinition) rectangleNestedContent.get( 2 ) ).getName().getLocalPart() );
        assertEquals( "height", ( (XmlElementDefinition) rectangleNestedContent.get( 3 ) ).getName().getLocalPart() );
       
        final XmlContentModel foundCircleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "circle" ) );
        assertNotNull( foundCircleContentModel );
       
        final XmlContentModel foundRectangleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "rectangle" ) );
        assertNotNull( foundRectangleContentModel );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.schema.XmlContentModel$InsertionPosition

Copyright © 2018 www.massapicom. 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.