Package com.sun.msv.grammar.xmlschema

Examples of com.sun.msv.grammar.xmlschema.ComplexTypeExp


                    ref.exp = sexp;
                    parentDecl.simpleBaseType = sexp.getType();
                    _assert(parentDecl.simpleBaseType!=null);
                    return;
                }
                ComplexTypeExp cexp = schema.complexTypes.get(baseTypeName[1]);
                if(cexp!=null) {
                    // we've found the complex type as the base type
                    ref.exp = cexp.body;
                    parentDecl.complexBaseType = cexp;
                    return;
View Full Code Here


            // derivation from anyType means this expression is the root of
            // derivation. So we don't have to connect this complex type to
            // the super class.
            return exp;
       
        ComplexTypeExp baseType =
            reader.getOrCreateSchema(r[0]/*uri*/).complexTypes.getOrCreate(r[1]/*local name*/);
        if( baseType==null )    return exp;    // recover by abandoning further processing of this declaration.
       
        reader.backwardReference.memorizeLink(baseType);
       
View Full Code Here

       
        String name = startTag.getAttribute("name");
        if( name==null ) {
            if( isGlobal() )
                reader.reportError( XMLSchemaReader.ERR_MISSING_ATTRIBUTE, "complexType", "name" );
            decl = new ComplexTypeExp( reader.currentSchema, null );
        } else {
            if( isRedefine() )
                // in redefine mode, use temporary object.
                // parsed complexType will be copied into the original one.
                decl = new ComplexTypeExp( reader.currentSchema, name );
            else {
                decl = reader.currentSchema.complexTypes.getOrCreate(name);
                // MSV has pre-defiend types in xsd namespace (such as xs:anyType)
                // this causes a problem when we are parsing schema4schema.
                // to avoid this problem, we won't issue this error when we are
View Full Code Here

        Object getCore();
    }
   
    private Type getType( XMLSchemaTypeExp exp ) {
        if( exp instanceof ComplexTypeExp ) {
            final ComplexTypeExp cexp = (ComplexTypeExp)exp;
            return new Type(){
                public int getDerivationMethod() { return cexp.derivationMethod; }
                public int getBlockValue() { return cexp.block; }
                public Type getBaseType() {
                    if( cexp.complexBaseType!=null )
View Full Code Here

                }
                wildcards = o;
            }
            else
            if( exp instanceof ComplexTypeExp ) {
                ComplexTypeExp cexp = (ComplexTypeExp)exp;
               
                final Set o = wildcards;
                {
                    // process children and collect their wildcards.
                    wildcards = new HashSet();
View Full Code Here

            XMLSchemaSchema schema = _docDecl.grammar.getByNamespace(typeName[0]);
            if(schema==null)
                return onTypeResolutionFailure(sti,type,refErr);
       
            final XMLSchemaTypeExp currentType = xe.parent.getTypeDefinition();
            ComplexTypeExp cexp = schema.complexTypes.get(typeName[1]);
            if(cexp!=null) {
                if(cexp.isDerivedTypeOf( currentType,
                        xe.parent.block|currentType.getBlock() ))
                    // this type can substitute the current type.
                    contentModel = cexp;
                else
                    return onNotSubstitutableType(sti,type,refErr);
View Full Code Here

                    // we've found the simple type
                    parentDecl.simpleBaseType = sexp.getType();
                    _assert(parentDecl.simpleBaseType!=null);
                    return;
                }
                ComplexTypeExp cexp = baseSchema.complexTypes.get(baseTypeName[1]);
                if(cexp!=null) {
                    // we've found the complex type as the base type
                    parentDecl.complexBaseType = cexp;
                    return;
                }
View Full Code Here

            SimpleTypeExp sexp = baseSchema.simpleTypes.get(baseTypeName[1]);
            if(sexp!=null) {
                // we've found the simple type as the base type
                return sexp.getType().getType(context);
            }
            ComplexTypeExp cexp = baseSchema.complexTypes.get(baseTypeName[1]);
            if(cexp!=null) {
                // we've found the complex type as the base type
                // look for XSDatatypeExp inside
                final XSDatatypeExp[] dexp = new XSDatatypeExp[1];
                cexp.body.visit(new ExpressionWalker() {
View Full Code Here

                    // we've found the simple type
                    parentDecl.simpleBaseType = sexp.getType();
                    _assert(parentDecl.simpleBaseType!=null);
                    return;
                }
                ComplexTypeExp cexp = baseSchema.complexTypes.get(baseTypeName[1]);
                if(cexp!=null) {
                    // we've found the complex type as the base type
                    parentDecl.complexBaseType = cexp;
                    return;
                }
View Full Code Here

            SimpleTypeExp sexp = baseSchema.simpleTypes.get(baseTypeName[1]);
            if(sexp!=null) {
                // we've found the simple type as the base type
                return sexp.getType().getType(context);
            }
            ComplexTypeExp cexp = baseSchema.complexTypes.get(baseTypeName[1]);
            if(cexp!=null) {
                // we've found the complex type as the base type
                // look for XSDatatypeExp inside
                final XSDatatypeExp[] dexp = new XSDatatypeExp[1];
                cexp.body.visit(new ExpressionWalker() {
View Full Code Here

TOP

Related Classes of com.sun.msv.grammar.xmlschema.ComplexTypeExp

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.