Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.SimpleNameClass


                            // so at most one IDAttMap can match it.
                            _assert(vec.size()==1);
                           
                            // by the same assumption, the attribute name must be
                            // simple.
                            SimpleNameClass attName = (SimpleNameClass)exp.nameClass;
                           
                            IDAttMap iam = (IDAttMap)vec.get(0);
                            if(!texp.getName().equals(iam.idatts.get(new StringPair(attName))))
                                reportCompError(
                                    new Locator[]{
View Full Code Here


        while( itr.hasNext() )
        {
            final TagClause tag = (TagClause)itr.next();
            if( tag.nameClass instanceof SimpleNameClass )
            {
                SimpleNameClass snc = (SimpleNameClass)tag.nameClass;
                if( tagNames.contains(snc.localName) )
                    overloadedNames.add(snc.localName);
                else
                    tagNames.add(snc.localName);
            }
View Full Code Here

        if(!(exp.nameClass instanceof SimpleNameClass ))    return;
       
        Expression body = exp.exp.getExpandedExp(reader.pool);
        if(!(body instanceof DataExp ))                    return;
       
        SimpleNameClass snc = (SimpleNameClass)exp.nameClass;
        if(!snc.namespaceURI.equals(""))    return;
       
        Datatype dt = ((DataExp)body).dt;
        if( dt==IDType.theInstance || dt==IDREFType.theInstance ) {
            if( currentTagName==null
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

   
    public void onAttribute( AttributeExp exp ) {
        if( exp.nameClass instanceof SimpleNameClass ) {
            // this check is only appliable for those who constrains
            // one particular attribute.
            SimpleNameClass nc = (SimpleNameClass)exp.nameClass;
            StringPair p = new StringPair( nc.namespaceURI, nc.localName );
           
            if( atts.containsKey(p) )
                throw new Eureka(p);    // eureka! : find two AttributeExps that share the same name.
            atts.put(p,current);
View Full Code Here

                // update the value of the isSimpleElement field.
                final boolean oldSE        = inSimpleElement;
                final boolean oldOC        = inOptionalChoice;
                final boolean oldC        = inChoice;
                final boolean oldOOM    = inOneOrMore;
                final SimpleNameClass prevElemName = currentElementName;
                final Map oldCA = currentAttributes;
                       
                inSimpleElement = (exp.getNameClass() instanceof SimpleNameClass);
                inOptionalChoice = true;
                inChoice = false;
View Full Code Here

            // inline element must be used as a child of elementRule
            throw new Error();    // assertion failed.
       
        TagClause c = new TagClause();
       
        c.nameClass = new SimpleNameClass(
            getReader().module.targetNamespace,
            name );
        c.exp = exp;    // exp holds a sequence of AttributeExp
       
        ((ElementRuleBaseState)parentState).onEndInlineClause(c);
View Full Code Here

                // since attributes are combined by sequence, so epsilon is appropriate.
                return Expression.epsilon;
            }
           
            Expression exp = reader.pool.createAttribute(
                new SimpleNameClass("",name),
                incubator.derive(null,null) );
           
            // unless required attribute is specified, it is considered optional
            if(! "true".equals(required) )
                exp = reader.pool.createOptional(exp);
View Full Code Here

                new Locator[]{getReader().getDeclaredLocationOf(c),location},
                RELAXCoreReader.ERR_MULTIPLE_TAG_DECLARATIONS, new Object[]{role} );
            // recover from error by ignoring previous tag declaration
        }
       
        c.nameClass = new SimpleNameClass(
            getReader().module.targetNamespace,
            name );
       
        c.exp = exp;    // exp holds a sequence of AttributeExp
        getReader().setDeclaredLocationOf(c);    // remember where this tag is declared
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

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.