protected function createTag($tagName, $template)
	{
		$tag = new Tag;
		foreach ($this->captures as $key => $capture)
		{
			if (!isset($capture['name']))
			{
				continue;
			}

			$attrName = $capture['name'];
			if (isset($tag->attributes[$attrName]))
			{
				continue;
			}

			$this->addAttribute($tag, $attrName);
		}
		$tag->template = $template;

		// Normalize the tag's template
		$this->configurator->templateNormalizer->normalizeTag($tag);

		// Check the safeness of this tag
		$this->configurator->templateChecker->checkTag($tag);

		return $this->configurator->tags->add($tagName, $tag);
	}