protected function rebuildTemplate(Tag $tag, $elName, $allowUnsafe)
	{
		$template = '<' . $elName . '>';
		foreach ($tag->attributes as $attrName => $attribute)
		{
			$template .= '<xsl:copy-of select="@' . $attrName . '"/>';
		}
		$template .= '<xsl:apply-templates/></' . $elName . '>';

		if ($allowUnsafe)
		{
			$template = new UnsafeTemplate($template);
		}

		$tag->setTemplate($template);
	}
protected function rebuildTemplate(Tag $tag, $elName, $allowUnsafe)
	{
		$template = '<' . $elName . '>';
		foreach ($tag->attributes as $attrName => $attribute)
		{
			$template .= '<xsl:copy-of select="@' . $attrName . '"/>';
		}
		$template .= '<xsl:apply-templates/></' . $elName . '>';

		if ($allowUnsafe)
		{
			$template = new UnsafeTemplate($template);
		}

		$tag->setTemplate($template);
	}
protected function rebuildTemplate ( Tag $ tag , $ elName , $ allowUnsafe ) { $ template = '<' . $ elName . '>' ; foreach ( $ tag -> attributes as $ attrName => $ attribute ) { $ template .= '<xsl:copy-of select="@' . $ attrName . '"/>' ; } $ template .= '<xsl:apply-templates/></' . $ elName . '>' ; if ( $ allowUnsafe ) { $ template = new UnsafeTemplate ( $ template ) ; } $ tag -> setTemplate ( $ template ) ; }
Rebuild a tag's template

@param  Tag    $tag         Source tag
@param  string $elName      Name of the HTML element created by the template
@param  bool   $allowUnsafe Whether to allow unsafe markup
@return void
Rebuild a tag s template