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
349248
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;
    }
656364
public function validate() {

		$result = parent::validate();

		// Confirm that the current search suggestion matches the minimum autocomplete length and doesn't already exist.

		if($result->isValid() && (strlen($this->Term) < 3)) {
			$result->addError('Minimum autocomplete length required!');
		}
		else if($result->isValid() && ExtensibleSearchSuggestion::get_one(ExtensibleSearchSuggestion::class, array(
			'ID != ?' => (int)$this->ID,
			'Term = ?' => $this->Term,
			'ExtensibleSearchPageID = ?' => $this->ExtensibleSearchPageID
		))) {
			$result->addError('Suggestion already exists!');
		}

		// Allow extension customisation.

		$this->extend('validateExtensibleSearchSuggestion', $result);
		return $result;
	}
1308812
public EncodedElement getEnd() {
    EncodedElement temp = next;
    EncodedElement end = this;
    while(temp != null) {
      end = temp;
      temp = temp.next;
    }
    return end;
  }
366207
private function _closeEnd()
    {
        if ($this->name === 'blank') {
            return;
        }

        echo str_replace(':name', $this->realName, $this->brackets['close_end']);
        $this->doCallback('closed');
        if (!$this->hasOption('inline')) {
            if (!$this->inlineInner) {
                $this->closingComment();
            }
            if ($this->name !== 'blank') {
                Generator::lineBreak();
            }
        }
    }
800912
public function end()
    {
        if ($this->parent) {
            $this->parent->addCriterion($this);
            return $this->parent->end();
        }
        return $this->slave;
    }
488901
public void endElement(String namespaceUri,
                           String localName,
                           String qualifiedName)
            throws SAXException {
        currentElement = null;
        currentDepth--;
        String indentation = indent(-1);
        String closingElement = "</" + getName(localName, qualifiedName) + ">";
        write(currentlyInLeafElement ? closingElement : nl + indentation + closingElement);
        currentlyInLeafElement = false;
        this.currentElement = null;
        if (frozenArtifactResolver.artifactInheritsVersionFromParent() &&
            ARTIFACT_ID.equals(qualifiedName) &&
            currentDepth == 1) {
            logger.info("[Freezehandler]: Artifact version " + frozenArtifactResolver.artifactFrozenVersion());
            write(nl + indentation + "<" + VERSION + ">" + frozenArtifactResolver.artifactFrozenVersion() + "</" + VERSION + ">");
        }
        switch (qualifiedName) {
            case GROUP_ID:
            case ARTIFACT_ID:
            case PACKAGING:
            case RELATIVE_PATH:
            case "":
                break;
            case VERSION:
            default:
                this.currentGroupIdArtifactIdVersion = new GroupIdArtifactIdVersion();
        }
    }
644115
public boolean nextInnerElement(ElementContext parent) throws XMLException, IOException {
		if (event.context.isEmpty()) return false;
		if (Type.START_ELEMENT.equals(event.type) && event.context.getFirst() == parent && event.isClosed)
			return false; // we are one the opening tag of the parent, and it is closed, so it has no content
		if (Type.END_ELEMENT.equals(event.type) && event.context.getFirst() == parent)
			return false;
		try {
			do {
				next();
				if (Type.END_ELEMENT.equals(event.type)) {
					if (event.context.getFirst() == parent)
						return false;
				}
				if (Type.START_ELEMENT.equals(event.type)) {
					if (event.context.size() > 1 && event.context.get(1) == parent)
						return true;
				}
			} while (true);
		} catch (EOFException e) {
			return false;
		}
	}
1012654
private function insertFormEnd() {

		$this->html = preg_replace(
			'/\{\s*end_form\s*\}/i',
			'</form>',
			$this->html,
			-1,
			$count
		);

		// more than one closing tag found

		if($count > 1) {

			throw new HtmlFormException("Found more than one closing {end_form} tags.", HtmlFormException::INVALID_MARKUP);

		}

		// no closing tag

		if(!$count) {
			$this->html .= '</form>';
		}

		return $this;

	}
1304673
private T getOpenFiniteEnd() {

        T temporal = this.end.getTemporal();

        if ((temporal != null) && this.end.isClosed()) {
            return this.getTimeLine().stepForward(temporal);
        } else {
            return temporal;
        }

    }
648387
public void endElement(String uri, String localName, String qName)
	    throws SAXException {
	// reduce the depth
	depth--;

	if (isExcluded()) {
	    // determine if exclusion ends with us
	    if (excludedDepth == depth)
	        excludedDepth = -1;

	    // either way, we have been excluded, so pass nothing through
	    return;
	}

	// if we're excepted (for now), include ourselves...
	if (isAccepted())
	    getContentHandler().endElement(uri, localName, qName);

	    if (DEBUG) {
		System.err.println("***   Closing tag: " + localName);
		System.err.println("***   acceptedDepths.size(): " + acceptedDepths.size());
		System.err.println("***   last accepted depth: " + ((Integer)acceptedDepths.peek()).intValue());
		System.err.println("***   depth: " + depth);
	    }

	// now, back off if we correspond to a "successful" start tag
        if (acceptedDepths.size() > 0 &&
		(((Integer)acceptedDepths.peek()).intValue()) == depth)
	    acceptedDepths.pop();
    }
316792
public function validateRegion()
    {
        if (! in_array($this->region, $this->regions)) {
            return self::REGION_DEFUALT;
        }

        return $this->region;
    }
748504
public function end() {
        $containerEnd = $this->formatTemplate('containerEnd', []);
        $responsiveEnd = '';
        if ($this->_responsive) {
            $responsiveEnd = $this->formatTemplate('responsiveEnd', []);
        }
        return $this->formatTemplate('navbarEnd', [
            'containerEnd' => $containerEnd,
            'responsiveEnd' => $responsiveEnd
        ]);
    }
146298
function () {
            if (this._validationPopup) {
                return;
            }
            // create the section
            var section = this._context.createSection({
                fn : this._renderValidationContent,
                scope : this
            });
            // we no longer store the section in this._section as the section is properly disposed by the popup when it
            // is disposed
            var popup = new ariaPopupsPopup();
            this._validationPopup = popup;
            this._validationPopup.$on({
                "onAfterClose" : this._afterValidationClose,
                "onPositioned" : this._onTooltipPositioned,
                scope : this
            });
            ariaTemplatesLayout.$on({
                "viewportResized" : this._onViewportResized,
                scope : this
            });
            this._validationPopup.open({
                section : section,
                domReference : this._field,
                preferredPositions : this._getPreferredPositions(),
                closeOnMouseClick : true,
                closeOnMouseScroll : false,
                waiAria: this._WidgetCfg.waiAria
            });

        }
1116115
public static function end()
	{
		$content = '';
		if (self::$open)
		{
			$content .= '</div></div>';
		}
		self::$open = false;
		$content .= '</div>';
		return $content;
	}
450825
function elementEnd() {
    if (isParent) {
        isParent = false;
    }
    else {
        ngDevMode && assertHasParent();
        previousOrParentNode = getParentLNode(previousOrParentNode);
    }
    ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);
    var queries = previousOrParentNode.queries;
    queries && queries.addNode(previousOrParentNode);
    queueLifecycleHooks(previousOrParentNode.tNode.flags, tView);
    currentElementNode = null;
}
701693
@Override
  protected void visitHtmlCloseTagNode(HtmlCloseTagNode node) {
    // This case occurs in the case where we encounter the end of a keyed element. If the open tag
    // mapped to this close tag contains a key node, pop the keyCounterStack to return
    // to the state before entering the keyed node.
    if (node.getTaggedPairs().size() == 1) {
      HtmlOpenTagNode openTag = (HtmlOpenTagNode) node.getTaggedPairs().get(0);
      if (openTag.getKeyNode() != null) {
        keyCounterStack.pop();
        getJsCodeBuilder().append(INCREMENTAL_DOM_POP_MANUAL_KEY.call());
      }
    }

    if (!node.getTagName().isDefinitelyVoid()) {
      emitClose(getTagNameCodeChunk(node.getTagName()));
    }
  }
1185100
public Element endElementBuilder() {
        final Element element = (Element) this.configurationStack.removeLast();
        if ( this.characters != null ) {
            element.appendChild( this.document.createTextNode( this.characters.toString() ) );
        }

        this.characters = null;

        return element;
    }