Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.NamespaceNameClass


    }
   
    /** Parsing state for <nsName> */
    public static class NsNameState extends NGNameState {
        protected NameClass getMainNameClass() {
            return new NamespaceNameClass( getPropagatedNamespace() );
        }
View Full Code Here


       
        if( namespace.equals("##other") )
            // ##other means anything other than the target namespace and local.
            return new NotNameClass(
                new ChoiceNameClass(
                    new NamespaceNameClass(currentSchema.targetNamespace),
                    new NamespaceNameClass("")) );
       
        NameClass choices=null;
       
        StringTokenizer tokens = new StringTokenizer(namespace);
        while( tokens.hasMoreTokens() ) {
            String token = tokens.nextToken();
           
            NameClass nc;
            if( token.equals("##targetNamespace") )
                nc = new NamespaceNameClass(currentSchema.targetNamespace);
            else
            if( token.equals("##local") )
                nc = new NamespaceNameClass("");
            else
                nc = new NamespaceNameClass(token);
           
            if( choices==null )        choices = nc;
            else                    choices = new ChoiceNameClass(choices,nc);
        }
       
View Full Code Here

                            // default namespace.
           
            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

                }
            }
           
            if( src.accepts(uris[i],MAGIC)!=src.accepts(MAGIC,MAGIC) ) {
                if(tmp==null)
                    tmp = new NamespaceNameClass(uris[i]);
                else
                    tmp = new DifferenceNameClass( new NamespaceNameClass(uris[i]), tmp );
            }
           
            if(r==null)        r = tmp;
            else            r = new ChoiceNameClass(r,tmp);
        }
View Full Code Here

                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
                    local = new DifferenceNameClass(new NamespaceNameClass(uri),local);
            }
           
            if(local!=null) {
                if(result==null)    result = local;
                else                result = new ChoiceNameClass(result,local);
View Full Code Here

*
* @author <a href="mailto:kohsuke.kawaguchi@eng.sun.com">Kohsuke KAWAGUCHI</a>
*/
public class NameClassNsNameState extends NameClassWithoutChildState {
    protected NameClass makeNameClass() {
        return new NamespaceNameClass( getPropagatedNamespace() );
    }
View Full Code Here

        // IslandVerifier.
        super(Expression.nullSet,false);
       
        this.ruleName = ruleName;
        this.namespaceURI = namespaceURI;
        this.nameClass = new NamespaceNameClass(namespaceURI);
        this.source = loc;
       
        /* provide dummy content model
       
            <mixed>
View Full Code Here

                errorHandler.warning( new SAXParseException(
                    Localizer.localize( Localizer.WRN_ANYOTHER_NAMESPACE_IGNORED, uri ), source ) );
                continue;
            }
           
            NamespaceNameClass nsnc = new NamespaceNameClass(uri);
            if( nc==null )    nc = nsnc;
            else            nc = new ChoiceNameClass(nc,nsnc);
        }
       
        if( excludeNamespace!=null )
        {
            // in case of 'excludeNamespace',
            // all defined namespace is also considered as illegal.
           
            Iterator itr = provider.iterateNamespace();
            while( itr.hasNext() )
            {
                NamespaceNameClass nsnc = new NamespaceNameClass( (String)itr.next() );
                if( nc==null )    nc = nsnc;
                else            nc = new ChoiceNameClass(nc,nsnc);
            }
           
            nc = new NotNameClass(nc);
View Full Code Here

            NameClass.ALL,
            NameClassSimplifier.simplify(
                new ChoiceNameClass(
                    NameClass.ALL,
                    new DifferenceNameClass(
                        new NamespaceNameClass("abc"),
                        new SimpleNameClass("abc","def")))));
    }
View Full Code Here

    public void testSimplifier2() throws Exception {
        NameClass nc = NameClassSimplifier.simplify(
            new DifferenceNameClass(
                new ChoiceNameClass(
                    NameClass.ALL,
                    new NamespaceNameClass("abc")
                ),
                new SimpleNameClass("abc","def")));
       
        assertTrue( nc instanceof NotNameClass );
        NotNameClass nnc = (NotNameClass)nc;
View Full Code Here

TOP

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

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.