<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet
 [ <!ENTITY xnbsp "&amp;nbsp;">
   <!ENTITY nbsp "&#160;"> ]>
<xsl:stylesheet version="1.0"
                xmlns="http://www.w3.org/TR/xhtml1/transitional"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- Project Notebook XSLT translator stylesheet.

     Communications page edition.

     This is a *very rough* first cut at translating the Project Notebook
     XML document into HTML automatically.
-->

<xsl:output method="html" indent="yes" media-type="text/html"/>

<xsl:include href="shared.xsl" /> <!-- shared definitions for I/S Project -->

<xsl:template match="/project">
    <HTML xmlns="http://www.w3.org/TR/xhtml1/transitional">

    <xsl:call-template name="head-element">
        <xsl:with-param name="title"><xsl:value-of select="@name"/> -- Communications</xsl:with-param>
    </xsl:call-template>

    <xsl:element name="BODY" use-attribute-sets="body-attrs">

    <xsl:call-template name="title-block">
        <xsl:with-param name="title">Project Communications</xsl:with-param>
        <xsl:with-param name="subtitle"><xsl:value-of select="/project/@name"/></xsl:with-param>
    </xsl:call-template>

    <TABLE BORDER="0" CELLSPACING="3" CELLPADDING="3" WIDTH="100%">

       <xsl:call-template name="title-row"/>

       <!-- Table row with nothing but a horizontal rule -->
       <TR><TD COLSPAN="2"><P><HR/></P></TD></TR>

       <TR>
       <xsl:element name="TH" use-attribute-sets="left-column">
          <STRONG>Detailed Contact Information</STRONG>
       </xsl:element>
       <td>
            <P/>
            <TABLE BORDER="1" CELLSPACING="3" CELLPADDING="3">
            <TR>
               <TD align="center">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Team member</B>
               </TD>
               <TD align="center">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Role</B>
               </TD>
               <TD align="center">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Email address</B>
               </TD>
               <TD align="center">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Phone numbers</B>
               </TD>
               <TD align="center">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Office address</B>
               </TD>
            </TR>
            <xsl:for-each select="team-member">
                <TR>
                   <TD align="left"><xsl:value-of select="@name"/><BR/></TD>
                   <TD align="left"><xsl:value-of select="@role"/><BR/></TD>
                   <TD align="left">
                     <xsl:if test="@email">
                       <A><xsl:attribute name="HREF">mailto:<xsl:value-of select="@email"/></xsl:attribute>
                       <xsl:value-of select="@email"/></A>
                     </xsl:if>
                   <BR/></TD>
                   <TD align="left">
                     <xsl:value-of select="@phone"/><BR/>
                     <xsl:if test="@homephone">
                       <I>Home:</I> <xsl:value-of select="@homephone"/><BR/>
                     </xsl:if>
                     <xsl:if test="@cellphone">
                       <I>Cell:</I> <xsl:value-of select="@cellphone"/><BR/>
                     </xsl:if>
                     <xsl:if test="@pager">
                       <I>Pager:</I> <xsl:value-of select="@pager"/><BR/>
                     </xsl:if>

                   </TD>
                   <TD align="left"><xsl:value-of select="@office"/><BR/></TD>
                </TR>
            </xsl:for-each>
         </TABLE>
       </td>
       </TR>

       <!-- Table row with nothing but a horizontal rule -->
       <TR><TD COLSPAN="2"><P><HR/></P></TD></TR>

       <TR>
          <xsl:element name="TH" use-attribute-sets="left-column">
             <STRONG>Project Comments</STRONG>
          </xsl:element>
          <TD>
<!--            The -->
<!--            <a href="projanon.html"> -->
<!--            Anonymous Project Comments form</a> -->
<!--            allows anyone to send -->
<!--            comments to your project anonymously.  You must edit the -->
<!--            form to provide the project email address - or fill in the -->
<!--            <A><xsl:attribute name="HREF">mailto:<xsl:value-of select="contact/text()"/></xsl:attribute> -->
<!--            project's email address</A> if you prefer. -->
        To submit comments on the project, send email to the 
        <A><xsl:attribute name="HREF">mailto:<xsl:value-of select="contact/text()"/></xsl:attribute>
        project's email address</A>.
          </TD>
       </TR>

       <!-- Table row with nothing but a horizontal rule -->
       <TR><TD COLSPAN="2"><P><HR/></P></TD></TR>

       <TR>
          <xsl:element name="TH" use-attribute-sets="left-column">
             <STRONG>Communications Matrix</STRONG>
          </xsl:element>
          <TD>
            <P/>
            <TABLE BORDER="1" CELLSPACING="3" CELLPADDING="3">
            <TR>
               <TH align="center" width="10%">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Type</B>
               </TH>
               <TH align="center" width="15%">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Location</B>
               </TH>
               <TH align="center" width="15%">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>When</B>
               </TH>
               <TH align="center" width="50%">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Purpose</B>
               </TH>
               <TH align="center" width="10%">
               <xsl:attribute name="BGCOLOR"><xsl:value-of select="$boxcolor"/></xsl:attribute>
                  <B>Access</B>
               </TH>
            </TR>
            <xsl:for-each select="communication">
                <TR>
                   <TD align="left"><xsl:value-of select="@type"/><BR/></TD>

                   <TD align="left">
                     <xsl:choose>
                       <xsl:when test="@href">
                         <A HREF="{@href}"><xsl:value-of select="@location"/></A>
                       </xsl:when>
                       <xsl:otherwise>
                         <xsl:value-of select="@location"/>
                       </xsl:otherwise>
                     </xsl:choose>
                     <BR/>
                   </TD>
                   <TD align="left"><xsl:value-of select="@when"/><BR/></TD>
                   <TD align="left"><xsl:value-of select="@purpose"/><BR/></TD>
                   <TD align="left"><xsl:value-of select="@access"/><BR/></TD>
                </TR>
            </xsl:for-each>
         </TABLE>
      </TD>
   </TR>

    </TABLE>
         
    <xsl:call-template name="trailer-block"/>

    </xsl:element> <!-- /body -->
    </HTML>
</xsl:template>

</xsl:stylesheet>
