Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.Expression.visit()


    Expression topLevel  = grammar.getTopLevel();
   
    // polish up this AGM for instance generation.
    if( grammar instanceof RELAXGrammar
    ||  grammar instanceof RELAXModule )
      topLevel = topLevel.visit( new NoneTypeRemover(grammar.getPool()) );
   
    if( grammar instanceof XMLSchemaGrammar )
      topLevel = topLevel.visit( new SchemaLocationRemover(grammar.getPool()) );
   
 
View Full Code Here


    if( grammar instanceof RELAXGrammar
    ||  grammar instanceof RELAXModule )
      topLevel = topLevel.visit( new NoneTypeRemover(grammar.getPool()) );
   
    if( grammar instanceof XMLSchemaGrammar )
      topLevel = topLevel.visit( new SchemaLocationRemover(grammar.getPool()) );
   
 
    topLevel = topLevel.visit( new RefExpRemover(grammar.getPool(),true) );
       
        if(rootName!=null) {
View Full Code Here

   
    if( grammar instanceof XMLSchemaGrammar )
      topLevel = topLevel.visit( new SchemaLocationRemover(grammar.getPool()) );
   
 
    topLevel = topLevel.visit( new RefExpRemover(grammar.getPool(),true) );
       
        if(rootName!=null) {
            topLevel = findElement(topLevel,rootName);
            if(topLevel==null) {
                out.println("unable to find the specified root element: "+rootName);
View Full Code Here

        // go one up the stack
        UniqueAncestor uniqueAncestor = mAncestorsAndCurrent.pop();
        // get the new parent
        Expression parent = mAncestorsAndCurrent.peek().mExp;
        // to get the siblings
        List<Expression> siblings = (List<Expression>) parent.visit(mVisitor);
        // get the unvisted sibling index
        final int nextSiblingIndex = uniqueAncestor.mSiblingIndex + 1;
        if (nextSiblingIndex < siblings.size()) {
          Expression nextExpCandidate = siblings.get(nextSiblingIndex);
          // DO NOT expand elements which occur more than one time in the ancestors hierarchy (i.e.
View Full Code Here

     * Since we use recursion we cannot make sure a path ends with an ElementExp or AttributeExp.
     */
    private static void buildPaths(MSVExpressionVisitorChildren visitor, List<List<Expression>> paths) {
        List<Expression> waytoresearch = paths.get(paths.size() - 1);
        Expression endpoint = waytoresearch.get(waytoresearch.size() - 1);
        List<Expression> children = (List<Expression>) endpoint.visit(visitor);

        if (children.size() == 1) {
            Expression child = children.get(0);
            waytoresearch.add(child);
            if (!(child instanceof ElementExp) && !(child instanceof AttributeExp)) {
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.