[xsl] How do you un-escape in HTML

Subject: [xsl] How do you un-escape in HTML
From: Arthur Maloney <ArthurMaloney@xxxxxxxxxx>
Date: Thu, 11 Dec 2003 13:50:29 +0000
Hello xsl-list,

HOW do I display original data?

This is my output in HTML   (cell in a TABLE)
 &apos;table&apos; and &apos;inline-table&apos; elements

original data
'table' and 'inline-table' elements

In the XML file I have escapes e.g. &apos; for '

XML Data for the element
<AppliesTo>&amp;apos;table&amp;apos; and &amp;apos;inline-table&amp;apos; elements</AppliesTo>



In the xsl transform file.

        <!--  Top level declartions -->
        <xsl:import href="../stylesheets/utils1.xsl" />
        <xsl:output method="html"/>


        <xsl:element name="td">
             <xsl:value-of select="./AppliesTo"/>
        </xsl:element>


At an earlier stage in VB I build the xml & put the escapes in.
Using MSXML2 Doc4

   '* Get rid of occurrences of '<'
   strContentCandidate = Replace(strContentCandidate, "<", "&lt;")
   
   '* Get rid of occurrences of '>'
   strContentCandidate = Replace(strContentCandidate, ">", "&gt;")
   
   '* Get rid of occurrences of '&'
   strContentCandidate = Replace(strContentCandidate, "&", "&amp;")
   
   '* Get rid of occurrences of '"'
   strContentCandidate = Replace(strContentCandidate, """", "&quot;")
   
   '* Get rid of occurrences of "'"
   validXMLContent = Replace(strContentCandidate, "'", "&apos;")


-- 
Best regards,
 Arthur                          mailto:ArthurMaloney@xxxxxxxxxx


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


Current Thread