Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.NameClass


        // test that the competing elements also has the same default values.
        itr = elements.iterator();
        while(itr.hasNext()) {
            final ElementExp eexp = (ElementExp)itr.next();
           
            NameClass nc = eexp.getNameClass();
            if(!(nc instanceof SimpleNameClass)) {
                // if the element has a complex name class,
                // it cannot have a default attribute value.
                // (this is checked within the first pass.
                // so in this case, we just need to make sure that
                // any competing elements do not have defaulted attributes.
                Iterator jtr = name2value.entrySet().iterator();
                while(jtr.hasNext()) {
                    Map.Entry e = (Map.Entry)jtr.next();
                    if(nc.accepts((StringPair)e.getKey())) {
                        // this element competes with this eexp.
                        DefAttMap defAtts = (DefAttMap)e.getValue();
                        if(defAtts.defaultAttributes.size()>0) {
                            // TODO: what should the error message be?
                            reportCompError(
View Full Code Here


        }
       
        // create choice of all possible namespace, and
        // return it.
        String[] candidates = (String[])vec.toArray(new String[vec.size()]);
        NameClass nc = new SimpleNameClass( candidates[0], s[1] );
//        System.out.println("candidate for "+s[0]+" is "+ candidates[0] );
        for( int i=1; i<vec.size(); i++ ) {
            nc = new ChoiceNameClass( nc,
                    new SimpleNameClass( candidates[i], s[1] ) );
//            System.out.println("candidate for "+s[0]+" is "+ candidates[i] );
View Full Code Here

               
                StringPair _en = elementName;
                IDAttMap _curAtts = curAtts;
                ElementExp _curElm = curElm;
               
                NameClass nc = exp.getNameClass();
                if(nc instanceof SimpleNameClass) {
                    elementName = new StringPair((SimpleNameClass)nc);
                    curAtts = (IDAttMap)name2value.get(elementName);    // maybe null.
                } else
                    elementName = null;
View Full Code Here

TOP

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

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.