Examples of IslandSchema


Examples of org.iso_relax.dispatcher.IslandSchema

        // module element should be appeared inline.
        inlineModuleExpected = true;
    }
   
    private void getSchema( IslandSchemaReader moduleReader ) {
        IslandSchema schema = moduleReader.getSchema();
        if( schema==null ) {
            // failed to load a module.
            reader.controller.setErrorFlag();
            schema = new IgnoredSchema();    // use a dummy schema
        }
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

        public Expression onOther(OtherExp exp) {
            try {
                if( exp instanceof ExternalAttributeExp ) {
                    ExternalAttributeExp eexp = (ExternalAttributeExp)exp;
                   
                    IslandSchema is = provider.getSchemaByNamespace(eexp.namespaceURI);
                    if(is==null) {
                        errorHandler.error( new SAXParseException(
                            localize(ERR_UNDEFINED_NAMESPACE, eexp.namespaceURI),
                            eexp.source) );
                        return exp;
                    }
                   
                    AttributesDecl rule = is.getAttributesDeclByName(eexp.role);
                    if(rule==null) {
                        errorHandler.error( new SAXParseException(
                            localize(ERR_UNEXPORTED_ATTRIBUTE_DECL, eexp.role),
                            eexp.source) );
                        return exp;
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

                    exp.contentModel = exp.contentModel.visit(this);
                    return exp;
                }
           
                ExternalElementExp eexp = (ExternalElementExp)exp;
                IslandSchema is = provider.getSchemaByNamespace(eexp.namespaceURI);
                if(is==null) {
                    errorHandler.error( new SAXParseException(
                        localize(ERR_UNDEFINED_NAMESPACE, eexp.namespaceURI),
                        eexp.source) );
                    return exp;
                }
                eexp.rule = is.getElementDeclByName(eexp.ruleName);
                if(eexp.rule==null)
                {
                    errorHandler.error( new SAXParseException(
                        localize(ERR_UNEXPORTED_ELEMENT_DECL, eexp.ruleName),
                        eexp.source) );
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

            // no two ExternalElementExp shall never share the same Rule object.
            throw new Error();
           
        // error check is already done in bind phase.
        // thus getSchemaByNamespace shall never fail.
        IslandSchema is = dispatcher.getSchemaProvider().getSchemaByNamespace(namespaceUri);

        // switch to the child Verifier.
        IslandVerifier iv = is.createNewVerifier(namespaceUri,rules);
        dispatcher.switchVerifier( iv );
       
        // simulate this startElement event
        iv.startElement( namespaceUri, localName, qName, atts );
    }
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

   
    public void startElement( String namespaceURI,
        String localName, String qName, Attributes atts )
        throws SAXException {

        IslandSchema is = dispatcher.getSchemaProvider().getSchemaByNamespace(namespaceURI);
        if( is!=null ) {
            // find an island that has to be validated.
            // switch to the new IslandVerifier.
            IslandVerifier iv = is.createNewVerifier( namespaceURI, is.getElementDecls() );
            dispatcher.switchVerifier(iv);
            iv.startElement(namespaceURI,localName,qName,atts);
            return;
        }
       
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

        Expression exp = Expression.nullSet;
       
        Iterator itr = provider.iterateNamespace();
        while( itr.hasNext() ) {
            String namespace = (String)itr.next();
            IslandSchema is = provider.getSchemaByNamespace(namespace);
            ElementDecl[] rules = is.getElementDecls();
           
            for( int j=0; j<rules.length; j++ )
                exp = module.pool.createChoice(exp,
                    new ExternalElementExp(module.pool,namespace,rules[j].getName(),null));
        }
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

        // module element should be appeared inline.
        inlineModuleExpected = true;
    }
   
    private void getSchema( IslandSchemaReader moduleReader ) {
        IslandSchema schema = moduleReader.getSchema();
        if( schema==null ) {
            // failed to load a module.
            reader.controller.setErrorFlag();
            schema = new IgnoredSchema();    // use a dummy schema
        }
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

        public Expression onOther(OtherExp exp) {
            try {
                if( exp instanceof ExternalAttributeExp ) {
                    ExternalAttributeExp eexp = (ExternalAttributeExp)exp;
                   
                    IslandSchema is = provider.getSchemaByNamespace(eexp.namespaceURI);
                    if(is==null) {
                        errorHandler.error( new SAXParseException(
                            localize(ERR_UNDEFINED_NAMESPACE, eexp.namespaceURI),
                            eexp.source) );
                        return exp;
                    }
                   
                    AttributesDecl rule = is.getAttributesDeclByName(eexp.role);
                    if(rule==null) {
                        errorHandler.error( new SAXParseException(
                            localize(ERR_UNEXPORTED_ATTRIBUTE_DECL, eexp.role),
                            eexp.source) );
                        return exp;
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

                    exp.contentModel = exp.contentModel.visit(this);
                    return exp;
                }
           
                ExternalElementExp eexp = (ExternalElementExp)exp;
                IslandSchema is = provider.getSchemaByNamespace(eexp.namespaceURI);
                if(is==null) {
                    errorHandler.error( new SAXParseException(
                        localize(ERR_UNDEFINED_NAMESPACE, eexp.namespaceURI),
                        eexp.source) );
                    return exp;
                }
                eexp.rule = is.getElementDeclByName(eexp.ruleName);
                if(eexp.rule==null)
                {
                    errorHandler.error( new SAXParseException(
                        localize(ERR_UNEXPORTED_ELEMENT_DECL, eexp.ruleName),
                        eexp.source) );
View Full Code Here

Examples of org.iso_relax.dispatcher.IslandSchema

            // no two ExternalElementExp shall never share the same Rule object.
            throw new Error();
           
        // error check is already done in bind phase.
        // thus getSchemaByNamespace shall never fail.
        IslandSchema is = dispatcher.getSchemaProvider().getSchemaByNamespace(namespaceUri);

        // switch to the child Verifier.
        IslandVerifier iv = is.createNewVerifier(namespaceUri,rules);
        dispatcher.switchVerifier( iv );
       
        // simulate this startElement event
        iv.startElement( namespaceUri, localName, qName, atts );
    }
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.