Examples of XmlDocumentSchema


Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

   
            final StringBuilder buf = new StringBuilder();
           
            for( String schemaLocation : rinfo.schemas.values() )
            {
                final XmlDocumentSchema xmlDocumentSchema = XmlDocumentSchemasCache.getSchema( schemaLocation );
               
                if( xmlDocumentSchema != null )
                {
                    for( Map.Entry<String,String> entry : xmlDocumentSchema.getSchemaLocations().entrySet() )
                    {
                        if( buf.length() > 0 )
                        {
                            buf.append( ' ' );
                        }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

        element.setAttributeNS( XSI_NAMESPACE, XSI_SCHEMA_LOCATION_ATTR_QUALIFIED, schemaLocationAttrValue );
    }

    private static String createSchemaLocationAttrValue( final String primarySchemaLocation )
    {
        final XmlDocumentSchema xmlDocumentSchema = XmlDocumentSchemasCache.getSchema( primarySchemaLocation );
        final StringBuilder buf = new StringBuilder();
       
        for( Map.Entry<String,String> entry : xmlDocumentSchema.getSchemaLocations().entrySet() )
        {
            if( buf.length() > 0 )
            {
                buf.append( ' ' );
            }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

                    }
                }
               
                if( publicId != null || systemId != null )
                {
                    final XmlDocumentSchema xmlDocumentSchema = XmlDocumentSchemasCache.getSchema( referer, publicId, systemId );
                   
                    if( xmlDocumentSchema != null )
                    {
                        final XmlElementDefinition xmlElementDefinition = xmlDocumentSchema.getElement( getLocalName() );
                       
                        if( xmlElementDefinition != null )
                        {
                            this.contentModel = xmlElementDefinition.getContentModel();
                        }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

    @Test
   
    public void testSchemaParsing() throws Exception
    {
        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( SCHEMA_LOCATION );
       
        final XmlElementDefinition rootElementDef = schema.getElement( "element" );
        final XmlSequenceGroup rootContentModel = (XmlSequenceGroup) rootElementDef.getContentModel();
        final List<XmlContentModel> nestedContent = rootContentModel.getNestedContent();
       
        assertEquals( 4, nestedContent.size() );
        assertEquals( "aaa", ( (XmlElementDefinition) nestedContent.get( 0 ) ).getName().getLocalPart() );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

    @Test
   
    public void testSchemaParsing() throws Exception
    {
        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( SCHEMA_LOCATION );
       
        final XmlElementDefinition rootElementDef = schema.getElement( "element" );
        final XmlSequenceGroup rootContentModel = (XmlSequenceGroup) rootElementDef.getContentModel();
        final List<XmlContentModel> nestedContent = rootContentModel.getNestedContent();
       
        assertEquals( 4, nestedContent.size() );
        assertEquals( "shape", ( (XmlElementDefinition) nestedContent.get( 0 ) ).getName().getLocalPart() );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

    @Test
   
    public void testSchemaParsing() throws Exception
    {
        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( NAMESPACE );
       
        final XmlElementDefinition workbookElementDef = schema.getElement( "workbook" );
        final XmlSequenceGroup workbookContentModel = (XmlSequenceGroup) workbookElementDef.getContentModel();
        final List<XmlContentModel> workbookNestedContent = workbookContentModel.getNestedContent();
       
        assertEquals( 1, workbookNestedContent.size() );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

{
    @Test
   
    public void testSchemaParsing() throws Exception
    {
        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( "http://www.eclipse.org/sapphire/tests/xml/xsd/0001" );
       
        final XmlElementDefinition rootElementDef = schema.getElement( "root" );
        final XmlSequenceGroup rootContentModel = (XmlSequenceGroup) rootElementDef.getContentModel();
        final List<XmlContentModel> nestedContent = rootContentModel.getNestedContent();
       
        assertEquals( 4, nestedContent.size() );
        assertEquals( "aaa", ( (XmlElementDefinition) nestedContent.get( 0 ) ).getName().getLocalPart() );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

    @Test
   
    public void testSchemaParsing() throws Exception
    {
        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( NAMESPACE );
       
        final XmlElementDefinition workbookElementDef = schema.getElement( "workbook" );
        final XmlSequenceGroup workbookContentModel = (XmlSequenceGroup) workbookElementDef.getContentModel();
        final List<XmlContentModel> workbookNestedContent = workbookContentModel.getNestedContent();
       
        assertEquals( 1, workbookNestedContent.size() );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

{
    @Test
   
    public void testSchemaParsing() throws Exception
    {
        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( "http://www.eclipse.org/sapphire/tests/xml/xsd/0007" );
       
        final XmlElementDefinition rootElementDef = schema.getElement( "root" );
        final XmlAllGroup rootContentModel = (XmlAllGroup) rootElementDef.getContentModel();
        final List<XmlContentModel> rootNestedContent = rootContentModel.getNestedContent();
       
        assertEquals( 2, rootNestedContent.size() );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlDocumentSchema

{
    @Test
   
    public void test() throws Exception
    {
        final XmlDocumentSchema schema = DtdParser.parse( loadResource( "input.dtd" ) );
        assertEqualsIgnoreNewLineDiffs( loadResource( "output.txt" ), schema.toString() );
    }
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.