Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Help in HTML Decoding

This post of mine went unanswered a couple of weeks back. I need an urgent
solution. Any help would be appriciated.
Tkanks in anticipation
Rohit

"I have HTMLEncode()ed HTML content (stored in a table) to pass as XML data
thru ASP.
At the client end, I want to render the HTML as Output in some DIV/TABLE.

My problem is that XSL is not able to identify the content as html (since
it has been encoded <,> etc)
Is there any way, I can render that? <![CDATA[]]> doesn't work (or at least
I dunno the way to use it here)

Any Help?
Rohit"
[612 byte] By [Rohit Wason] at [2007-11-9 14:55:08]
# 1 Re: Help in HTML Decoding
"Rohit Wason" <rohitw@futuresoftindia.com> wrote:
>
>This post of mine went unanswered a couple of weeks back. I need an urgent
>solution. Any help would be appriciated.
>Tkanks in anticipation
>Rohit
>
>"I have HTMLEncode()ed HTML content (stored in a table) to pass as XML data
>thru ASP.
>At the client end, I want to render the HTML as Output in some DIV/TABLE.
>
>My problem is that XSL is not able to identify the content as html (since
>it has been encoded <,> etc)
>Is there any way, I can render that? <![CDATA[]]> doesn't work (or at least
>I dunno the way to use it here)
>

Rohit:
Put the HTML content that has > or< between <xsl:comment><![CDATA[ here
]]></xsl:comment>. I think your problem will be solved
>Any Help?
>Rohit"
Manish Gupta at 2007-11-11 23:33:56 >
# 2 Re: Help in HTML Decoding
>Rohit:
> Put the HTML content that has > or< between <xsl:comment><![CDATA[ here
> ]]></xsl:comment>. I think your problem will be solved
>>Any Help?
>>Rohit"
>

Manish,
I did explained, I've used CDATA[], but it doesn't work here. Anyways, mine
was an urgent problem, I spent time and founda solution to it. Publishing
static HTML (like my case) thru XML docs requires a couple of thinks to keep
in mind:

. The HTML content should be XHTML (<BR/> <HR/> and so on..). We can take
care of this at the time of inserting the content into DB
. We should use <xsl:copy> syntax to copy the content as is in the form of
"HTML nodes"

That's what works in my case. CDATA[] (sorry) fails to work in this scenario.
It simply tries to render my contents as is on the display:
"<B>Message</B>. Hello <I>World</I>."

Rohit
Rohit Wason at 2007-11-11 23:34:52 >