<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" omit-xml-declaration="yes"/>
  <xsl:template match="/">

    <h5>
      as of <xsl:value-of select="Root/@S1"/>
    </h5>

    <table>
      <tbody>
        <tr>
          <th>Status</th>
          <th>
            Non-Federal<br/>(General)
          </th>
          <th>Federal</th>
          <th>Total</th>
        </tr>

        <xsl:for-each select="Root//T[@B]">
          <tr>
            <td style="background-color:#D7E5F3">
              <a>
                <xsl:attribute name="href">
                  <xsl:text>/superfund/proposed-national-priorities-list-npl-sites-state</xsl:text>
                </xsl:attribute>
                Proposed NPL Sites
              </a>
            </td>
            <td>
              <xsl:value-of select="@B"/>
            </td>
            <td>
              <xsl:value-of select="@C"/>
            </td>
            <td>
              <xsl:value-of select="@D"/>
            </td>
          </tr>
          <tr>
            <td style="background-color:#D7E5F3">
              <a>
                <xsl:attribute name="href">
                  <xsl:text>/superfund/final-national-priorities-list-npl-sites-state</xsl:text>
                </xsl:attribute>
                NPL Sites
              </a>
            </td>
            <td>
              <xsl:value-of select="@E"/>
            </td>
            <td>
              <xsl:value-of select="@F"/>
            </td>
            <td>
              <xsl:value-of select="@G"/>
            </td>
          </tr>
          <tr>
            <td style="background-color:#D7E5F3">
              <a>
                <xsl:attribute name="href">
                  <xsl:text>/superfund/deleted-national-priorities-list-npl-sites-state</xsl:text>
                </xsl:attribute>
                Deleted NPL Sites
              </a>
            </td>
            <td>
              <xsl:value-of select="@H"/>
            </td>
            <td>
              <xsl:value-of select="@I"/>
            </td>
            <td>
              <xsl:value-of select="@J"/>
            </td>
          </tr>
        </xsl:for-each>
        <tr>
          <td colspan="19" style="background-color:#D7E5F3">
            <br/>
          </td>
        </tr>
        <tr>
          <td colspan="19">
            <br/>
          </td>
        </tr>


        <tr>
          <th>Milestone</th>
          <th>
            Non-Federal<br/>(General)
          </th>
          <th>Federal</th>
          <th>Total</th>
        </tr>

        <xsl:for-each select="//T">

          <tr>
            <td style="background-color:#D7E5F3">
              <a>
                <xsl:attribute name="href">
                  <xsl:text>/superfund/partial-deletions-npl-sites-state</xsl:text>
                </xsl:attribute>
                Partial Deletions at NPL Sites
              </a>
            </td>
            <td>
              <xsl:value-of select="@KNonDistinct"/>
            </td>
            <td>
              <xsl:value-of select="@LNonDistinct"/>
            </td>
            <td>
              <xsl:value-of select="@MNonDistinct"/>*
            </td>
          </tr>

          <tr>
            <td style="background-color:#D7E5F3">
              <a>
                <xsl:attribute name="href">
                  <xsl:text>/superfund/construction-completions-npl-sites-state</xsl:text>
                </xsl:attribute>
                Construction Completions at NPL Sites
              </a>
            </td>
            <td>
              <xsl:value-of select="@N"/>
            </td>
            <td>
              <xsl:value-of select="@O"/>
            </td>
            <td>
              <xsl:value-of select="@P"/>**
            </td>
          </tr>

          <tr>
            <td colspan="19" style="background-color:#D7E5F3">
              <table>
                <tbody>
                  <tr>
                    <td valign="top">*</td>
                    <td style="font-size: 11pt;">
                      These <xsl:value-of select="@Q"/> partial deletions have occurred at <xsl:value-of select="@M"/> sites.
                    </td>
                  </tr>
                  <tr>
                    <td valign="top">**</td>
                    <td style="font-size: 11pt;">
                      Starting in FY14, the universe of potential site-wide CCL sites includes final and deleted NPL sites as well as sites with Superfund Alternative Approach (SAA) agreements. Since FY14, CCL has been achieved at nine sites with SAA agreements. Prior to FY14, CCL was achieved at nine sites with SAA agreements. For more information about SAA sites, see:
                      <a href="http://www.epa.gov/enforcement/superfund-alternative-approach">http://www.epa.gov/enforcement/superfund-alternative-approach</a>.
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>

  </xsl:template>
</xsl:stylesheet>