如何将html标签传递给xsl模板?

时间:2021-06-22 23:09:47

My XML file has html tags inside, built like that:

我的XML文件里面有html标签,就像那样构建:

<pre>

 <table border="">

  <tbody>
   <tr>
    <th>Time</th>
    <th>Result</th>
    <th>Test</th>
    <th>Method</th>
   </tr> 
   <tr>
    <td> 6:28:09 PM </td>
    <td bgcolor="#FF0000"> FAIL </td>
    <td width="30%"> TEST </td>
    <td width="70%"> test_method </td>
   </tr> 
  </tbody>
 </table>
  </pre>

This is table with test report. I' dlike to pass this table to my xsl template and then display it iside my generated file.

这是带测试报告的表格。我想将此表传递给我的xsl模板,然后将其显示在我生成的文件中。

<xsl:value-of select="$suite/testsuite/tests/command/summaries/report/output" />

Bu in my html i see

我在我的HTML中看到了

<pre> <table border=""> <tbody> <tr> <th>Time</th> <th>Result</th> <th>Test</th> <th>Method</th> </tr> <tr> <td> 6:28:09 PM </td> <td bgcolor="#FF0000"> FAIL </td> <td width="30%"> TEST </td> <td width="70%"> test_method </td> </tr> </tbody> </table> </pre>

as text, table is not applied. How can I display my table in newly created html file?

作为文本,表不适用。如何在新创建的html文件中显示我的表格?

1 个解决方案

#1


0  

If the used XSLT processor supports it then disable-output-escaping can help: <xsl:value-of select="$suite/testsuite/tests/command/summaries/report/output" disable-output-escaping="yes"/>. Do note that Mozilla browsers like Firefox do not support it.

如果使用的XSLT处理器支持它,那么disable-output-escaping可以提供帮助: 。请注意,像Firefox这样的Mozilla浏览器不支持它。

#1


0  

If the used XSLT processor supports it then disable-output-escaping can help: <xsl:value-of select="$suite/testsuite/tests/command/summaries/report/output" disable-output-escaping="yes"/>. Do note that Mozilla browsers like Firefox do not support it.

如果使用的XSLT处理器支持它,那么disable-output-escaping可以提供帮助: 。请注意,像Firefox这样的Mozilla浏览器不支持它。