This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dealing with CDATA on the client-side


I've been playing with XML & XSL for a few weeks now, but for the most part 
all my output to the client has been HTML/XHTML through a server-side 
transformation with the IIS XML ISAPI plugin.

I've been trying to convert some of the work to a client-side solution for 
IE5 users, but there's one thing that I can't seem to find a workable 
solution for.

We're storing some of the text and HTML data in the XML documents as CDATA 
sections like so:

<etcetera>
    <![CDATA[this is a <a href="http://yahoo.com>test link/a>]]>
</etcetera>

applying XSL on the client-side leaves unparsed HTML sitting in the text, 
so it looks like this in a browser:

this is a <a href="http://yahoo.com>test link/a>

instead of

this is a test link  (test link being a hyperlink to yahoo in this example)

Now to get around this, on the server-side, we've been doing search and 
replaces on &lt; and &gt; characters, and replacing them with < and > to 
produce parse-able HTML when sent to the client.

We'd like to be able to do all of this on the client side, but can't seem 
to find an appropriate solution to do this. I'm sure this has come up for 
others, is there a way to accomplish this entirely on the client-side with 
IE 5?

thanks,
Matt


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]