如何使用xslt 1.0防止html内容解析

时间:2011-07-06 14:50:20

标签: xslt-1.0

i am generating html from an xml using xslt 1.0, but when i pass the html from one transformation to another ; 
it is getting the content displayed and not preserving the actual html with nodes
<tr>
<td>Text1</td>
<td>Text2</td>
<td>Text3</td>
<td>Text4</td>
<tr>

显示为Text1Text2Text3Text4,但不应该是

我正在使用的XSLT代码

<ns1:EmailContentAsString>
        <div class="rvps8"><table border='1' cellpadding='4' cellspacing='0' style='border-width: 0px; border-collapse: collapse;margin-left:48px'><tr valign='top'><td width='96' valign='top' style='border-width : 1px; border-color: #000000; border-style: solid; background-color: #cccccc;'><p><span class='rvts8'>NV Business Id</span></p></td><td width='230' valign='top' style='border-width : 1px; border-color: #000000; border-style: solid; background-color: #cccccc;'><p><span class='rvts8'>Business Entity Name</span></p></td><td width='180' valign='top' style='border-width : 1px; border-color: #000000; border-style: solid; background-color: #cccccc;'><p><span class='rvts8'>Actions/Amendments</span></p></td><td width='79' valign='top' style='border-width : 1px; border-color: #000000; border-style: solid; background-color: #cccccc;'><p><span class='rvts8'>File date</span></p></td></tr><tr><td colspan='4'><table cellspacing='0' cellpadding='0'><xsl:apply-templates select="/ns2:ExtendedCorpDetails/ns2:ExtendedFinalCorpDetails"/></table></td></tr></table></div>
      </ns1:EmailContentAsString>
<xsl:apply-templates select="/ns2:ExtendedCorpDetails/ns2:ExtendedFinalCorpDetails"/>
is used for generating rows shown above

1 个答案:

答案 0 :(得分:0)

通过使用&amp; lt;

修改html标记'&lt;'来解决此问题