Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.SimpleNameClass


        }
       
        reader.setDeclaredLocationOf(decl);

        ElementDeclExp.XSElementExp exp = decl.new XSElementExp(
            new SimpleNameClass(targetNamespace,name), contentType );
       
        // set the body.
        decl.setElementExp(exp);

        // set identity constraints
View Full Code Here


            public void onAttribute( AttributeExp exp ) {
                // found an attribute
                if(!(exp.nameClass instanceof SimpleNameClass))
                    throw new Error();    // attribute uses must have a simple name.
               
                SimpleNameClass snc = (SimpleNameClass)exp.nameClass;
               
                // see if the dervied type has a definition that
                // overrides this attribute.
                if( !explicitAtts.contains(snc.toStringPair()) ) {
                    // this attribute is not defined. copy it.
                    cexp.body.exp = reader.pool.createSequence(
                        cexp.body.exp,
                        isOptional?reader.pool.createOptional(exp):exp );
                }
View Full Code Here

                           
                    if(!(name instanceof SimpleNameClass ))
                        // assertion failed.
                        // XML Schema's element declaration is always simple name.
                        throw new Error();
                    SimpleNameClass snc = (SimpleNameClass)name;
                           
                    laxNc.addName(snc.namespaceURI,snc.localName);
                }
            }
        }
View Full Code Here

    public Expression onAttribute( AttributeExp exp )
    {
        if(!(exp.nameClass instanceof SimpleNameClass ))
            return exp;    // leave it as is. or should we consider this as a failed assertion?
           
        SimpleNameClass nc = (SimpleNameClass)exp.nameClass;
        if( !nc.namespaceURI.equals("") )
            return exp;    // externl attributes. leave it as is.
           
        return pool.createAttribute(
            new SimpleNameClass( targetNamespace, nc.localName ),
            exp.exp );
    }
View Full Code Here

            if( "prohibited".equals(use) )
                // use='prohibited' is implemented through NoneType
                contentType = reader.pool.createData( NoneType.theInstance );
           
            exp = createAttribute(
                new SimpleNameClass( targetNamespace, name ),
                contentType );
        }
       
        if( isGlobal() ) {
           
View Full Code Here

        xsiSchemaLocationExp = exp;
        exp.exp =
            pool.createSequence(
            pool.createOptional(
                pool.createAttribute(
                    new SimpleNameClass(XMLSchemaSchema.XMLSchemaInstanceNamespace,"schemaLocation")
                )
            ),
            pool.createOptional(
                pool.createAttribute(
                    new SimpleNameClass(XMLSchemaSchema.XMLSchemaInstanceNamespace,"noNamespaceSchemaLocation")
                )
            )
        );

        this.grammar = new XMLSchemaGrammar(pool);
View Full Code Here

                if( items[i].namespaceURI==NAMESPACE_WILDCARD
                 || items[i].localName==LOCALNAME_WILDCARD )
                    continue;
               
                nc = new DifferenceNameClass(nc,
                    new SimpleNameClass(items[i]));
            }
            equivalentNameClass = nc;
        }
       
        return equivalentNameClass.visit(visitor);
View Full Code Here

                final StringPair name = (StringPair)itr.next();
               
                if(!name.namespaceURI.equals(uri))        continue;
                if(name.localName==MAGIC)                continue;
               
                if(local==null)    local = new SimpleNameClass(name);
                else            local = new ChoiceNameClass(local,new SimpleNameClass(name));
            }
            if(possibleNames.contains(new StringPair(uri,MAGIC))) {
                if(local==null)
                    local = new NamespaceNameClass(uri);
                else
View Full Code Here

            for( int j=0; j<values.length; j++ ) {
                if( !values[j].namespaceURI.equals(uris[i]) )    continue;
                if( values[j].localName==MAGIC )                continue;
               
                if( src.accepts(values[j])!=src.accepts(uris[i],MAGIC) ) {
                    if(tmp==null)    tmp = new SimpleNameClass(values[j]);
                    else            tmp = new ChoiceNameClass( tmp, new SimpleNameClass(values[j]) );
                }
            }
           
            if( src.accepts(uris[i],MAGIC)!=src.accepts(MAGIC,MAGIC) ) {
                if(tmp==null)
View Full Code Here

    }
   
    public Object visit( NameClassVisitor visitor ) {
        // use the approximation.
        // FIXME
        return new SimpleNameClass("",localName).visit(visitor);
    }
View Full Code Here

TOP

Related Classes of com.sun.msv.grammar.SimpleNameClass

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.