<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/PERIODIC_TABLE">
      <html>
        <body>
          <h1>Atomic Number vs. Melting Point</h1>
          <table>
            <th>Element</th>
            <th>Atomic Number</th>
            <th>Melting Point</th>
            <xsl:apply-templates select="child::ATOM"/>
          </table>
        </body>
      </html>
    </xsl:template>

    <xsl:template match="ATOM">
      <xsl:apply-templates
       select="child::MELTING_POINT"/>
    </xsl:template>

    <xsl:template match="MELTING_POINT">
       <tr>
        <td>
          <xsl:value-of select="parent::*/child::NAME"/>
        </td>
        <td>
          <xsl:value-of
         select="parent::*/child::ATOMIC_NUMBER"/>
        </td>
        <td>
          <xsl:value-of select="self::*"/>
          <xsl:value-of select="attribute::UNITS"/>
        </td>
      </tr>
   </xsl:template>

</xsl:stylesheet>
