public function getTemplate()
	{
		// Build the <xsl:choose> node
		$xsl = '<xsl:choose>';

		// First, test whether the emoticon should be rendered as text if applicable
		if (!empty($this->notIfCondition))
		{
			$xsl .= '<xsl:when test="' . htmlspecialchars($this->notIfCondition) . '">'
			      . '<xsl:value-of select="."/>'
			      . '</xsl:when>'
			      . '<xsl:otherwise>'
			      . '<xsl:choose>';
		}

		// Iterate over codes, create an <xsl:when> for each emote
		foreach ($this->collection as $code => $template)
		{
			$xsl .= '<xsl:when test=".=' . htmlspecialchars(XPath::export($code)) . '">'
			      . $template
			      . '</xsl:when>';
		}

		// Finish it with an <xsl:otherwise> that displays the unknown codes as text
		$xsl .= '<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>';

		// Close the emote switch
		$xsl .= '</xsl:choose>';

		// Close the "notIf" condition if applicable
		if (!empty($this->notIfCondition))
		{
			$xsl .= '</xsl:otherwise></xsl:choose>';
		}

		return $xsl;
	}
public function getTemplate()
	{
		// Build the <xsl:choose> node
		$xsl = '<xsl:choose>';

		// First, test whether the emoticon should be rendered as text if applicable
		if (!empty($this->notIfCondition))
		{
			$xsl .= '<xsl:when test="' . htmlspecialchars($this->notIfCondition) . '">'
			      . '<xsl:value-of select="."/>'
			      . '</xsl:when>'
			      . '<xsl:otherwise>'
			      . '<xsl:choose>';
		}

		// Iterate over codes, create an <xsl:when> for each emote
		foreach ($this->collection as $code => $template)
		{
			$xsl .= '<xsl:when test=".=' . htmlspecialchars(XPath::export($code)) . '">'
			      . $template
			      . '</xsl:when>';
		}

		// Finish it with an <xsl:otherwise> that displays the unknown codes as text
		$xsl .= '<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>';

		// Close the emote switch
		$xsl .= '</xsl:choose>';

		// Close the "notIf" condition if applicable
		if (!empty($this->notIfCondition))
		{
			$xsl .= '</xsl:otherwise></xsl:choose>';
		}

		return $xsl;
	}
public function getTemplate ( ) { // Build the <xsl:choose> node $ xsl = '<xsl:choose>' ; // First, test whether the emoticon should be rendered as text if applicable if ( ! empty ( $ this -> notIfCondition ) ) { $ xsl .= '<xsl:when test="' . htmlspecialchars ( $ this -> notIfCondition ) . '">' . '<xsl:value-of select="."/>' . '</xsl:when>' . '<xsl:otherwise>' . '<xsl:choose>' ; } // Iterate over codes, create an <xsl:when> for each emote foreach ( $ this -> collection as $ code => $ template ) { $ xsl .= '<xsl:when test=".=' . htmlspecialchars ( XPath :: export ( $ code ) ) . '">' . $ template . '</xsl:when>' ; } // Finish it with an <xsl:otherwise> that displays the unknown codes as text $ xsl .= '<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>' ; // Close the emote switch $ xsl .= '</xsl:choose>' ; // Close the "notIf" condition if applicable if ( ! empty ( $ this -> notIfCondition ) ) { $ xsl .= '</xsl:otherwise></xsl:choose>' ; } return $ xsl ; }
Generate the dynamic template that renders all emoticons

@return string
Generate the dynamic template that renders all emoticons