Sql 转换oracle';使用xslt将xml转换为html?

Sql 转换oracle';使用xslt将xml转换为html?,sql,xml,oracle,xslt,Sql,Xml,Oracle,Xslt,我需要转换xml(使用xslt转换为html)文件,该文件是我从OracleSQLDeveloperHR模式下载数据集生成的!请帮助我编写xsl文件,将下载的数据转换成一个表 一段xml <?xml version='1.0' encoding='UTF8'?> <RESULTS> <ROW> <COLUMN NAME="Employee_Names"><![CDATA[Steven]]></COLUMN>

我需要转换xml(使用xslt转换为html)文件,该文件是我从OracleSQLDeveloperHR模式下载数据集生成的!请帮助我编写xsl文件,将下载的数据转换成一个表

一段xml

<?xml version='1.0' encoding='UTF8'?>
<RESULTS>
  <ROW>
    <COLUMN NAME="Employee_Names"><![CDATA[Steven]]></COLUMN>
    <COLUMN NAME="Salary"><![CDATA[24000]]></COLUMN>
    <COLUMN NAME="STREET_ADDRESS"><![CDATA[1297 Via Cola di Rie]]></COLUMN>
  </ROW>
  <ROW>
    <COLUMN NAME="Employee_Names"><![CDATA[Neena]]></COLUMN>
    <COLUMN NAME="Salary"><![CDATA[17000]]></COLUMN>
    <COLUMN NAME="STREET_ADDRESS"><![CDATA[1297 Via Cola di Rie]]></COLUMN>
  </ROW>

我的所有数据都以字符串而不是表格的形式显示(请帮助

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:output method="xml" indent="yes"
      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>

  <xsl:template match="/RESULTS">
    <html>
      <head>
        <title>Table data</title>
      </head>
      <body>
        <table>
          <thead>
            <!-- Extract the column-names from the first row. -->
            <xsl:apply-templates select="ROW[1]" mode="header"/>
          </thead>
          <tbody>
            <xsl:apply-templates select="ROW"/>
          </tbody>
        </table>
      </body>
    </html>
  </xsl:template>

  <!-- "header"-mode generates the column headers. -->
  <xsl:template match="ROW" mode="header">
    <tr>
      <xsl:apply-templates match="COLUMN" mode="header"/>
    </tr>
  </xsl:template>

  <xsl:template match="COLUMN" mode="header">
    <th>
      <xsl:value-of select="@NAME"/>
    </th>
  </xsl:template>

  <!-- normal mode generates the table data -->
  <xsl:template match="ROW">
    <tr>
      <xsl:apply-templates match="COLUMN"/>
    </tr>
  </xsl:template>

  <xsl:template match="COLUMN">
    <td>
      <xsl:value-of select="text()"/>
    </td>
  </xsl:template>

</xsl:stylesheet>


表数据
输出:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Table data</title>
  </head>
  <body>
    <table>
      <thead>
        <tr>
          <th>Employee_Names</th>
          <th>Salary</th>
          <th>STREET_ADDRESS</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Steven</td>
          <td>24000</td>
          <td>1297 Via Cola di Rie</td>
        </tr>
        <tr>
          <td>Neena</td>
          <td>17000</td>
          <td>1297 Via Cola di Rie</td>
        </tr>
      </tbody>
    </table>
  </body>
</html>

表数据
雇员姓名
薪水
街道地址
史蒂文
24000
1297 Via Cola di Rie
尼娜
17000
1297 Via Cola di Rie

非常感谢!您是xsl的大师)!