﻿<?xml version="1.0" encoding="utf-8"?>
<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="/">

    <p>
      The following table shows the number of Federal and general sites for each status and milestone as of <xsl:value-of select="Root/@S1"/>:
    </p>
    <div style="margin: auto; width: 100%;">
      <table style="border: 0; width: 100%;">
        <thead>
          <tr>
            <th style="width: 35%;">Status</th>
            <th style="width: 35%;">Non-Federal (General)</th>
            <th style="width: 15%;">Federal</th>
            <th style="width: 15%;">Total</th>
          </tr>
        </thead>
        <tbody>
          <xsl:for-each select="Root//T[@B]">
            <tr>
              <td class="row_head">
                <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 class="row_head">
                <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 class="row_head">
                <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>
        </tbody>
      </table>

      <table style="border: 0; width: 100%;">
        <thead>
          <tr>
            <th style="width: 35%;">Milestone</th>
            <th style="width: 35%;">Non-Federal (General)</th>
            <th style="width: 15%;">Federal</th>
            <th style="width: 15%;">Total</th>
          </tr>
        </thead>
        <tbody>
          <xsl:for-each select="//T">

            <tr>
              <td class="row_head">
                <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 class="row_head">
                <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" class="row_head">
                <xsl:text>Sites that have achieved these milestones are included in one of the three NPL status categories.</xsl:text>
                <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>
    </div>

  </xsl:template>
</xsl:stylesheet>
