Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.ReferenceExp


           
            Vector locs = new Vector();
           
            for( ; i<sz; i++ ) {
                if( refStack.elementAt(i) instanceof ReferenceExp ) {
                    ReferenceExp e = (ReferenceExp)refStack.elementAt(i);
                    if( e.name==null )    continue;    // skip anonymous ref.
                   
                    if( s.length()!=0 )     s += " > ";
                    s += e.name;
                   
View Full Code Here


    static final public class RefContainer extends ReferenceContainer {
        public ReferenceExp getOrCreate( String name ) {
            return super._getOrCreate(name);
        }
        protected ReferenceExp createReference( String name ) {
            return new ReferenceExp(name);
        }
View Full Code Here

    protected Expression annealExpression( Expression exp ) {
        final String name = startTag.getAttribute("name");
       
        if(name!=null) {
            // name attribute is optional.
            ReferenceExp ref = getReader().grammar.namedPatterns.getOrCreate(name);
            ref.exp = exp;
            exp = ref;
        }
       
        getReader().grammar.exp = exp;
View Full Code Here

            // minOccurs/maxOccurs is processed through interception
            return ep;
        }
       
        // "lax"/"strict" has to be back-patched later.
        final ReferenceExp exp = new ReferenceExp("any("+process+":"+namespace+")");
        reader.addBackPatchJob( new GrammarReader.BackPatch(){
            public State getOwnerState() { return AnyElementState.this; }
            public void patch() {

                if( !process.equals("lax")
View Full Code Here

        // TODO: shall I memorize this as a backward reference?
        // reader.backwardReference.memorizeLink(???);
       
        // symbol may not be defined at this moment.
        // so just return an empty ReferenceExp and back-patch the actual definition later.
        final ReferenceExp ref = new ReferenceExp("elementType("+typeQName+")");
       
        final String[] s = reader.splitQName(typeQName);
        if(s==null) {
            reader.reportError( XMLSchemaReader.ERR_UNDECLARED_PREFIX, typeQName );
            ref.exp = Expression.nullSet;    // recover by setting a dummy definition.
View Full Code Here

        prevNamedPattern = reader.currentNamedPattern;    // push
        previousDirectRefernce = reader.directRefernce;
       
        reader.directRefernce = true;
       
        ReferenceExp exp = getReference();
        if(exp==null)
            //abort. there was an error in this declaration
            reader.currentNamedPattern = null;
        else {
            reader.currentNamedPattern = reader.getRefExpParseInfo(exp);
View Full Code Here

                return Expression.nullSet;
                // recover by returning something that can be interpreted as Pattern
            }
        }
       
        ReferenceExp r = grammar.namedPatterns.getOrCreate(name);
        wrapUp(r);
        return r;
    }
View Full Code Here

       
        final XMLSchemaSchema schema = reader.grammar.getByNamespace(baseTypeName[0]);
       
        // we don't know whether it's a complex type or a simple type.
        // so back patch it
        final ReferenceExp ref = new ReferenceExp(null);
        reader.addBackPatchJob( new GrammarReader.BackPatch(){
            public State getOwnerState() {
                return SimpleContentExtensionState.this;
            }
            public void patch() {
View Full Code Here

       
        // by putting them into ReferenceExp, # of expressions usually gets smaller
        // because createSequence are right-associative and any attempt to extend
        // this sequence will end up creating new SequenceExps.
        // It's also good for writer: it can generate more compact XML representation.
        ReferenceExp exp = new ReferenceExp( XMLSchemaSchemaLocationAttributes );
        xsiSchemaLocationExp = exp;
        exp.exp =
            pool.createSequence(
            pool.createOptional(
                pool.createAttribute(
View Full Code Here

public class ElementDeclExp extends ReferenceExp
{
    public ElementDeclExp( XMLSchemaSchema schema, String typeLocalName ) {
        super(typeLocalName);
        this.parent = schema;
        this.substitutions = new ReferenceExp( typeLocalName+":substitutions" );
        this.substitutions.exp = Expression.nullSet;
    }
View Full Code Here

TOP

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

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.