/** * Method called after parsing (but before returning) end element, * to allow for pluggable validators to verify correctness of * the content model for the closing element. * * @return Validation state that should be effective for the parent * element state */ public int validateEndElement() throws XMLStreamException { if (mValidator == null) { // should never be null if we get here return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } int result = mValidator.validateElementEnd (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix); if (mDepth == 1) { // root closing mValidator.validationCompleted(true); } return result; }
mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
public int validateElementEnd(String localName, String uri, String prefix) throws XMLValidationException { int textType1 = mFirst.validateElementEnd(localName, uri, prefix); int textType2 = mSecond.validateElementEnd(localName, uri, prefix); // As with earlier, let's return stricter of the two return (textType1 < textType2) ? textType1 : textType2; }
public int validateElementEnd(String localName, String uri, String prefix) throws XMLStreamException { int textType1 = mFirst.validateElementEnd(localName, uri, prefix); int textType2 = mSecond.validateElementEnd(localName, uri, prefix); // As with earlier, let's return stricter of the two return (textType1 < textType2) ? textType1 : textType2; }
public int validateElementEnd(String localName, String uri, String prefix) throws XMLValidationException { int textType1 = mFirst.validateElementEnd(localName, uri, prefix); int textType2 = mSecond.validateElementEnd(localName, uri, prefix); // As with earlier, let's return stricter of the two return (textType1 < textType2) ? textType1 : textType2; }
public int validateElementEnd(String localName, String uri, String prefix) throws XMLValidationException { int textType1 = mFirst.validateElementEnd(localName, uri, prefix); int textType2 = mSecond.validateElementEnd(localName, uri, prefix); // As with earlier, let's return stricter of the two return (textType1 < textType2) ? textType1 : textType2; }
mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX); mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
mVldContent = mValidator.validateElementEnd(localName, nsURI, prefix); mVldContent = mValidator.validateElementEnd(localName, nsURI, prefix);
/** * @return Validation state that should be effective for the parent * element state */ public int pop() throws XMLStreamException { if (mSize == 0) { throw new IllegalStateException("Popping from empty stack."); } if (mValidator == null) { /* Let's allow GCing (not likely to matter, as Strings are very * likely interned... but it's a good habit */ mElements[--mSize] = null; return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } /* Note: can and should not shrink the stack before calling * validator (since it can do a callback to access the info -- * not just the current element, but possibly other related data * like stack depth) */ int size = mSize-1; int result = mValidator.validateElementEnd(mElements[size], null, null); mSize = size; mElements[size] = null; return result; }
mVldContent = mValidator.validateElementEnd (curr.getLocalName(), curr.getNamespaceURI(), curr.getPrefix());
/** * @return Validation state that should be effective for the parent * element state */ public int pop() throws XMLStreamException { if (mSize == 0) { throw new IllegalStateException("Popping from empty stack."); } if (mValidator == null) { /* Let's allow GCing (not likely to matter, as Strings are very * likely interned... but it's a good habit */ mElements[--mSize] = null; return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } /* Note: can and should not shrink the stack before calling * validator (since it can do a callback to access the info -- * not just the current element, but possibly other related data * like stack depth) */ int size = mSize-1; int result = mValidator.validateElementEnd(mElements[size], null, null); mSize = size; mElements[size] = null; return result; }
/** * @return Validation state that should be effective for the parent * element state */ public int pop() throws XMLStreamException { if (mSize == 0) { throw new IllegalStateException("Popping from empty stack."); } if (mValidator == null) { /* Let's allow GCing (not likely to matter, as Strings are very * likely interned... but it's a good habit */ mElements[--mSize] = null; return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } /* Note: can and should not shrink the stack before calling * validator (since it can do a callback to access the info -- * not just the current element, but possibly other related data * like stack depth) */ int size = mSize-1; int result = mValidator.validateElementEnd(mElements[size], null, null); mSize = size; mElements[size] = null; return result; }
/** * Method called after parsing (but before returning) end element, * to allow for pluggable validators to verify correctness of * the content model for the closing element. * * @return Validation state that should be effective for the parent * element state */ public int validateEndElement() throws XMLStreamException { if (mValidator == null) { // should never be null if we get here return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } int result = mValidator.validateElementEnd (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix); if (mDepth == 1) { // root closing mValidator.validationCompleted(true); } return result; }
/** * Method called after parsing (but before returning) end element, * to allow for pluggable validators to verify correctness of * the content model for the closing element. * * @return Validation state that should be effective for the parent * element state */ public int validateEndElement() throws XMLStreamException { if (mValidator == null) { // should never be null if we get here return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } int result = mValidator.validateElementEnd (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix); if (mDepth == 1) { // root closing mValidator.validationCompleted(true); } return result; }
/** * Method called after parsing (but before returning) end element, * to allow for pluggable validators to verify correctness of * the content model for the closing element. * * @return Validation state that should be effective for the parent * element state */ public int validateEndElement() throws XMLStreamException { if (mValidator == null) { // should never be null if we get here return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } int result = mValidator.validateElementEnd (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix); if (mDepth == 1) { // root closing mValidator.validationCompleted(true); } return result; }
/** * Method called after parsing (but before returning) end element, * to allow for pluggable validators to verify correctness of * the content model for the closing element. * * @return Validation state that should be effective for the parent * element state */ public int validateEndElement() throws XMLStreamException { if (mValidator == null) { // should never be null if we get here return XMLValidator.CONTENT_ALLOW_ANY_TEXT; } int result = mValidator.validateElementEnd (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix); if (mDepth == 1) { // root closing mValidator.validationCompleted(true); } return result; }
mVldContent = mValidator.validateElementEnd(localName, NO_NS_URI, NO_PREFIX);
mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
mVldContent = mValidator.validateElementEnd(localName, NO_NS_URI, NO_PREFIX);
mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);