@Override
    public void validateElementStart(String localName, String uri, String prefix)
        throws XMLStreamException
    {
        /* [WSTX-200]: If sub-tree we were to validate has ended, we
         *   have no current acceptor, and must quite. Ideally we would
         *   really handle this more cleanly but...
         */
        if (mCurrAcceptor == null) {
            return;
        }

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

        /* 31-Mar-2006, TSa: MSV seems to require empty String for empty/no
         *   namespace, not null.
         */
        if (uri == null) {
            uri = "";
        }

        /* Do we need to properly fill it? Or could we just put local name?
         * Looking at code, I do believe it's only used for error reporting
         * purposes...
         */
        //String qname = (prefix == null || prefix.length() == 0) ? localName : (prefix + ":" +localName);
        String qname = localName;
        mStartTag.reinit(uri, localName, qname, mAttributeProxy, this);
        mStartTagPrefix = prefix;

        mCurrAcceptor = mCurrAcceptor.createChildAcceptor(mStartTag, mErrorRef);
        /* As per documentation, the side-effect of getting the error message
         * is that we also get a recoverable non-null acceptor... thus, should
         * never (?) see null acceptor being returned
         */
        if (mErrorRef.str != null) {
            reportError(mErrorRef, START_ELEMENT, _qname(uri, localName, prefix));
        }
        if (mProblem != null) { // pending problems (to throw exception on)?
            XMLValidationProblem p = mProblem;
            mProblem = null;
            mContext.reportProblem(p);
        }
        mAcceptors.add(mCurrAcceptor);
    }
@ Override public void validateElementStart ( String localName , String uri , String prefix ) throws XMLStreamException { if ( mCurrAcceptor == null ) { return ; } if ( mTextAccumulator . hasText ( ) ) { doValidateText ( mTextAccumulator ) ; } if ( uri == null ) { uri = "" ; } String qname = localName ; mStartTag . reinit ( uri , localName , qname , mAttributeProxy , this ) ; mStartTagPrefix = prefix ; mCurrAcceptor = mCurrAcceptor . createChildAcceptor ( mStartTag , mErrorRef ) ; if ( mErrorRef . str != null ) { reportError ( mErrorRef , START_ELEMENT , _qname ( uri , localName , prefix ) ) ; } if ( mProblem != null ) { XMLValidationProblem p = mProblem ; mProblem = null ; mContext . reportProblem ( p ) ; } mAcceptors . add ( mCurrAcceptor ) ; }
Method called to update information about the newly encountered (start)
element. At this point namespace information has been resolved, but
no DTD validation has been done. Validator is to do these validations,
including checking for attribute value (and existence) compatibility.