﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/">
    <xsl:variable name="NumberGoalDataXml" select="AjaxRequest/NumberGoalData/."></xsl:variable>

    <table class="tableMaster" cellpadding="0" cellspacing="0">
      <tr>
        <td width="60%">
          graph here
        </td>
        <td width="40%">
          <table class="tableMaster" cellpadding="0" cellspacing="0">
            <xsl:for-each select="$NumberGoalDataXml/NumberGoal">
              <xsl:variable name="Amount">
                <xsl:choose>
                  <xsl:when test="Amount != -99">
                    <xsl:value-of select="round(Amount)"/>
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:text></xsl:text>
                  </xsl:otherwise>
                </xsl:choose>
              </xsl:variable>

              <tr>
                <td width="50%">
                  <xsl:value-of select="PeriodKey"/>
                </td>
                <td width="50%" class="verticallyMiddle">
                  <input type="text" value="{$Amount}" style="width:100px;"></input>
                </td>
              </tr>
            </xsl:for-each>
          </table>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
