Subject: [xsl] XSLT test condition From: Senthilukvelaan <skumaravelan@xxxxxxxxxxxxxx> Date: Mon, 2 Mar 2009 14:33:01 -0800 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Push Processing, Vyacheslav Sedov | Thread | Re: [xsl] XSLT test condition, David Carlisle |
RE: [xsl] Push Processing, Michael Kay | Date | Re: [xsl] XSLT test condition, David Carlisle |
Month |