Как предотвратить разбор html-содержимого с помощью xslt 1.0 - PullRequest
0 голосов
/ 06 июля 2011
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 голосов
/ 08 июля 2011

решил эту проблему, изменив html-теги '<' </strong> с помощью & # 38lt;

...