Package com.sun.msv.verifier

Examples of com.sun.msv.verifier.Acceptor


        int lastIx = mAcceptors.size()-1;
        if (lastIx < 0) {
            return XMLValidator.CONTENT_ALLOW_WS;
        }

        Acceptor acc = (Acceptor)mAcceptors.remove(lastIx);
        if (acc != null) { // may be null during error recovery? or not?
            if (!acc.isAcceptState(mErrorRef) || mErrorRef.str != null) {
                reportError(mErrorRef);
            }
        }
        if (lastIx == 0) { // root closed
            mCurrAcceptor = null;
View Full Code Here


       
        // we pass in an empty attributes, as there is just no way for us to
        // properly re-construct attributes. Fortunately, I know MSV is not using
        // attribute values, so this would work, but nevertheless this code is
        // ugly. This is one of the problems of the "middle" approach.
        Acceptor child = acceptor.createChildAcceptor( sti, null );
        if( child==null ) {
            // this element is invalid. probably, so this object is invalid
            // report an error
            StringRef ref = new StringRef();
            child = acceptor.createChildAcceptor( sti, ref );
View Full Code Here

            acceptor.isAcceptState(ref);
            context.reportEvent(target,ref.str);
        }
       
        // pop the acceptor
        Acceptor child = acceptor;
        acceptor = (Acceptor)stack.pop();
        if(!acceptor.stepForward( child, null )) {
            // some required elements are missing.
            // report an error
            StringRef ref = new StringRef();
View Full Code Here

            intfName/*just pass the local name as QName.*/,
            emptyAttributes,
            this );
       
           
        Acceptor child = acceptor.createChildAcceptor(sti,null);
        if(child==null) {
            // some required elements were missing. report errors
            StringRef ref = new StringRef();
            child = acceptor.createChildAcceptor(sti,ref);
            context.reportEvent(target,ref.str);
        }
       
        if(o instanceof RIElement) {
            RIElement rie = (RIElement)o;
            if(!child.onAttribute2(
                rie.____jaxb_ri____getNamespaceURI(),
                rie.____jaxb_ri____getLocalName(),
                rie.____jaxb_ri____getLocalName(),
                "",
                null, null, null ))
               
                // this object is not a valid member of the wildcard
                context.reportEvent(target,
                    Messages.format( Messages.INCORRECT_CHILD_FOR_WILDCARD,
                        rie.____jaxb_ri____getNamespaceURI(),
                        rie.____jaxb_ri____getLocalName() ));
        }
       
        child.onEndAttributes(sti,null);
       
       
        if(!acceptor.stepForward(child,null)) {
            // this can't be possible, as the dummy element was
            // generated by XJC.
View Full Code Here

        // Very first thing: do we have text collected?
        if (mTextAccumulator.hasText()) {
            doValidateText(mTextAccumulator);
        }

        Acceptor acc = (Acceptor)mAcceptors.remove(mAcceptors.size()-1);
        if (acc != null) { // may be null during error recovery? or not?
            if (!acc.isAcceptState(mErrorRef) || mErrorRef.str != null) {
                reportError(mErrorRef);
            }
        }
        int len = mAcceptors.size();
        if (len == 0) { // root closed
View Full Code Here

       
        // we pass in an empty attributes, as there is just no way for us to
        // properly re-construct attributes. Fortunately, I know MSV is not using
        // attribute values, so this would work, but nevertheless this code is
        // ugly. This is one of the problems of the "middle" approach.
        Acceptor child = acceptor.createChildAcceptor( sti, null );
        if( child==null ) {
            // this element is invalid. probably, so this object is invalid
            // report an error
            StringRef ref = new StringRef();
            child = acceptor.createChildAcceptor( sti, ref );
View Full Code Here

            acceptor.isAcceptState(ref);
            context.reportEvent(target,ref.str);
        }
       
        // pop the acceptor
        Acceptor child = acceptor;
        acceptor = (Acceptor)stack.pop();
        if(!acceptor.stepForward( child, null )) {
            // some required elements are missing.
            // report an error
            StringRef ref = new StringRef();
View Full Code Here

            intfName/*just pass the local name as QName.*/,
            emptyAttributes,
            this );
       
           
        Acceptor child = acceptor.createChildAcceptor(sti,null);
        if(child==null) {
            // some required elements were missing. report errors
            StringRef ref = new StringRef();
            child = acceptor.createChildAcceptor(sti,ref);
            context.reportEvent(target,ref.str);
        }
       
        if(o instanceof RIElement) {
            RIElement rie = (RIElement)o;
            if(!child.onAttribute2(
                rie.____jaxb_ri____getNamespaceURI(),
                rie.____jaxb_ri____getLocalName(),
                rie.____jaxb_ri____getLocalName(),
                "",
                null, null, null ))
               
                // this object is not a valid member of the wildcard
                context.reportEvent(target,
                    Messages.format( Messages.INCORRECT_CHILD_FOR_WILDCARD,
                        rie.____jaxb_ri____getNamespaceURI(),
                        rie.____jaxb_ri____getLocalName() ));
        }
       
        child.onEndAttributes(sti,null);
       
       
        if(!acceptor.stepForward(child,null)) {
            // this can't be possible, as the dummy element was
            // generated by XJC.
View Full Code Here

       
        // we pass in an empty attributes, as there is just no way for us to
        // properly re-construct attributes. Fortunately, I know MSV is not using
        // attribute values, so this would work, but nevertheless this code is
        // ugly. This is one of the problems of the "middle" approach.
        Acceptor child = acceptor.createChildAcceptor( sti, null );
        if( child==null ) {
            // this element is invalid. probably, so this object is invalid
            // report an error
            StringRef ref = new StringRef();
            child = acceptor.createChildAcceptor( sti, ref );
View Full Code Here

            acceptor.isAcceptState(ref);
            context.reportEvent(target,ref.str);
        }
       
        // pop the acceptor
        Acceptor child = acceptor;
        acceptor = (Acceptor)stack.pop();
        if(!acceptor.stepForward( child, null )) {
            // some required elements are missing.
            // report an error
            StringRef ref = new StringRef();
View Full Code Here

TOP

Related Classes of com.sun.msv.verifier.Acceptor

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.