public function endElement($name)
    {
        if ($name === 'label') {
            $this->acceptLabelEnd();

            return true;
        }
        if ($name === 'form') {
            $this->acceptFormEnd();

            return true;
        }
        if ($name === 'frameset') {
            $this->acceptFramesetEnd();

            return true;
        }
        if ($this->hasNamedTagOnOpenTagStack($name)) {
            $tag = array_pop($this->tags[$name]);
            if ($tag->isPrivateContent() && $this->private_content_tag->getTagName() == $name) {
                unset($this->private_content_tag);
            }
            $this->addContentTagToOpenTags($tag);
            $this->acceptTag($tag);

            return true;
        }

        return true;
    }