Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - >Thread Next - Re: [xsl] XSLT test condition [xsl] XSLT test conditionTo: Date: 3/2/2009 10:33:00 PM Hi All, I have difficulty in testing a variable matches "text/plain" and "text/html". Based on the out come I need to disable-output-escaping="yes". Please help , how to resolve the same. <xsl:template match="node()"> <tr> <td><xsl:value-of select="name(.)" /></td> <td> <xsl:variable name="content_type" select="normalize-space(preceding-sibling::Content-type[1])"/> <xsl:value-of select="$content_type"/> <xsl:choose> <xsl:when test="$content_type=$HTML"> <xsl:value-of select="text()" disable-output-escaping="yes"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="text()"/> </xsl:otherwise> </xsl:choose> </td> </tr> <xsl:apply-templates /> </xsl:template> Thanks, Senthil | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
