Examples of SimpleNameClass


Examples of com.sun.msv.grammar.SimpleNameClass

           
            NameClass nc;
           
            // TODO: NCName test.
            if( qn[1].equals("*") )        nc = new NamespaceNameClass(qn[0]);
            else                        nc = new SimpleNameClass(qn[0],qn[1]);
           
            if( attribute==true )    pathObj.attributeStep = nc;
            else                    stepObjs.add(nc);
        }
           
View Full Code Here

Examples of com.sun.msv.grammar.SimpleNameClass

                // 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

Examples of com.sun.msv.grammar.SimpleNameClass

    protected NameClass getNameClass( String maybeQName, boolean handleAsAttribute ) {
        String[] s = splitQName(maybeQName);
       
        if(s[0].length()==0 && handleAsAttribute )
            // if this is an attribute and unprefixed, it is local to the element.
            return new SimpleNameClass(s[0],s[1]);
       
        Set vec = (Set)namespaces.get(s[0]/*uri*/);
        if(vec==null) {
            if(s[0].equals(""))
                // this DTD does not attempt to use namespace.
                // this is OK and we assume anonymous namespace.
                return new SimpleNameClass("",s[1]);
           
            // we found element name like "html:p" but
            // we haven't see any "xmlns:html" attribute declaration.
            // this is considered as an error for MSV.
            controller.error( new Locator[]{locator},
                Localizer.localize( ERR_UNDECLARED_PREFIX, s[0] ), null );
           
            // recover by returning something
            return new LocalNameClass( s[1]/*local*/ );
        }
       
        if( vec.contains(ABANDON_URI_SNIFFING) ) {
//            System.out.println("sniffing abandoned for "+s[0]);
            // possibly multiple URI can be assigned.
            // so fall back to use LocalNameClass to at least check local part.
            return new LocalNameClass( s[1] );
        }
       
        // 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] );
        }
        return nc;
    }
View Full Code Here

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

Examples of com.sun.msv.grammar.SimpleNameClass

            // 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

Examples of com.sun.xml.internal.rngom.nc.SimpleNameClass

    /**
     * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
     */
    private NameClass getNameClass(XSDeclaration decl) {
        return new SimpleNameClass(decl.getTargetNamespace(), decl.getName());
    }
View Full Code Here

Examples of com.sun.xml.internal.rngom.nc.SimpleNameClass

    /**
     * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
     */
    private NameClass getNameClass(XSDeclaration decl) {
        return new SimpleNameClass(decl.getTargetNamespace(), decl.getName());
    }
View Full Code Here

Examples of org.kohsuke.rngom.nc.SimpleNameClass

    /**
     * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
     */
    private NameClass getNameClass(XSDeclaration decl) {
        return new SimpleNameClass(decl.getTargetNamespace(), decl.getName());
    }
View Full Code Here

Examples of org.kohsuke.rngom.nc.SimpleNameClass

    /**
     * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
     */
    private NameClass getNameClass( XSDeclaration decl ) {
        return new SimpleNameClass(decl.getTargetNamespace(),decl.getName());
    }
View Full Code Here

Examples of org.kohsuke.rngom.nc.SimpleNameClass

    /**
     * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
     */
    private NameClass getNameClass(XSDeclaration decl) {
        return new SimpleNameClass(decl.getTargetNamespace(), decl.getName());
    }
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.