<?xml version="1.0" ?> <!-- -*- sgml -*- -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- This is a sample XSL file that converts the bbdb-generated XML -->
<!-- file into html.  -->

<xsl:template match="/">

    <xsl:apply-templates/>

</xsl:template>

<xsl:template match="section">

  <xsl:variable name="secid">
    <xsl:value-of select="@initial"/>
  </xsl:variable>
  
  <a name="{$secid}"></a>
  <xsl:apply-templates/>

</xsl:template>

<xsl:template match="BBDB">

  <html>
    <body bgcolor="fffff0">
    <title> P. S. Senior Secondary School Class of '94 - Contact List </title>
    <font size="+2">
    <b>
      P. S. Senior Secondary School Class of '94 - Contact List
    </b>
    </font>
<br/><br/>
    <table width="100%" CELLPADDING="1" CELLSPACING="0" BORDER="0">
    <tr>
      <td bgcolor="fcf0d8">

          <font color="ff0000"> Mon Aug  1 02:03:04 2005 </font>
          Added records for Harsha Vyas.<br/>
          <font color="ff0000"> Tue May 24 18:36:26 IST 2005 </font>
          Added records for Bhanurekha, Hariharasudhan, Sundar
          Narayanan.  Updates for Karra, KR Balaji, V Karthik, SV,
          Raja, Krishnan, Dharam, Sundar, V. Ka<br/>
          <font color="ff0000"> Tue Jul 13 16:59:02 2004 </font> Added
          records for Aravindan, Subbu.  Update from V.Ka, Raja,
          Gacchi.<br/>
          <font color="ff0000"> Fri Mar 19 12:28:37 2004 </font>
          Update from Rajiv.<br/>
          <font color="ff0000"> Fri Feb 27 16:32:23 2004 </font> 
          Added records for Archana, Sudhamani. Update from Upendar.

      </td>
    </tr>
    </table>

    <p/>
    <center>
    <table width="90%" CELLPADDING="16" CELLSPACING="0" BORDER="1">
    <tr>
    <td bgcolor="fff8dc">
       <i>

          If you graduated from P.S. in 1994 and would like your
          contact information to be listed here, please send an email
          to <a href="mailto:karra@shakti.homelinux.net">Sriram
          Karra</a> If, for some reason, you do not want your contact
          information or any other detail displayed here, or you want
          something changed, please get in touch with Karra.

          <p/>Note: The email addresses have been modified a little to
	  provide some protection from spam.  You should replace all
	  "/@/" sequences with a simple "@" before mailing.

       </i>
    </td>
    </tr>
    </table>
    </center>

    <p/>
    Quick jump to first entry with this letter:
      <a href="#a">A </a>
      <a href="#b">B </a>
      <a href="#c">C </a>
      <a href="#d">D </a>
      <a href="#e">E </a>
      <a href="#f">F </a>
      <a href="#g">G </a>
      <a href="#h">H </a>
      <a href="#i">I </a>
      <a href="#j">J </a>
      <a href="#k">K </a>
      <a href="#l">L </a>
      <a href="#m">M </a>
      <a href="#n">N </a>
      <a href="#o">O </a>
      <a href="#p">P </a>
      <a href="#q">Q </a>
      <a href="#r">R </a>
      <a href="#s">S </a>
      <a href="#t">T </a>
      <a href="#u">U </a>
      <a href="#v">V </a>
      <a href="#w">W </a>
      <a href="#x">X </a>
      <a href="#y">Y </a>
      <a href="#z">Z </a>
    <p/>

    <!-- Parse the fields of each record and format the output -->
    
    <hr/>
    <xsl:apply-templates/>

    <!-- Print a footer with some shameless plugs :) -->

    <p/>
    <center>
    <table width="90%" CELLPADDING="16" CELLSPACING="0" BORDER="1">
    <tr>
      <td bgcolor="ffffcc">
       <i>
          <a href="ps94.html">This document</a> was generated by
          taking a <a
          href="http://www.cs.utah.edu/~karra/ps94/bbdb.xml">raw XML
          file</a> containing all the info and <a
          href="http://www.cs.utah.edu/~karra/ps94/README">applying</a>
          an <a
          href="http://www.cs.utah.edu/~karra/ps94/ps94.xsl">
          XSL transformation</a> on it.  The raw XML document itself
          was generated from <a
          href="http://www.cs.utah.edu/~karra">Karra</a>'s
          <a href="http://bbdb.sourceforge.net">BBDB</a> database
          using the <a
          href="http://www.cs.utah.edu/~karra/ps94/bbdb-xml-print.el">
          bbdb-xml-print.el</a> package.
	  
       </i>
      </td>
    </tr>

    </table>
    </center>

  </body>
  </html>

</xsl:template>

<!-- Per-record template.  Process a single student entry -->

<xsl:template match="record">

  <font color="ff4500">
     <b><xsl:value-of select="name"/></b>
     <br/>
  </font>

  <xsl:apply-templates/>
  <hr/>

</xsl:template>

<xsl:template match="phones">
<!--  <font color="1e90ff">Phones:</font> -->
    <xsl:for-each select="phone">
      <font color="1e90ff"><xsl:value-of select="@location"/>: </font>
      <xsl:value-of select="."/>
      <xsl:if test="position()!=last()"><br/></xsl:if>
    </xsl:for-each>
    <br/>
</xsl:template>

<xsl:template match="address">
  <font color="1e90ff"><xsl:value-of select="@location"/>: </font>
  <xsl:for-each select="line">
      <xsl:value-of select="."/>, 
  </xsl:for-each>

  <xsl:variable name="city">
     <xsl:value-of select="city"/>
  </xsl:variable>

  <xsl:if test="$city!=''">
    <xsl:value-of select="$city"/>, 
  </xsl:if>

  <xsl:variable name="state">
     <xsl:value-of select="state"/>
  </xsl:variable>

  <xsl:if test="$state!=''">
    <xsl:value-of select="state"/>, 
  </xsl:if>

  <xsl:variable name="zip">
     <xsl:value-of select="zip"/>
  </xsl:variable>

  <xsl:if test="$zip!=''">  
    <xsl:value-of select="$zip"/>.
  </xsl:if>

  <xsl:if test="position()!=last()"><br/></xsl:if>
</xsl:template>

<xsl:template match="emails">
  <font color="1e90ff">Emails: </font>
  <xsl:apply-templates/>
  <br/>
</xsl:template>

<xsl:template match="email">
  <xsl:value-of select="."/>
  <xsl:if test="position()!=last()">, </xsl:if>
</xsl:template>

<!-- These empty templates are necessary... atleast with the XSL -->
<!-- engine in IE6.0... -->

<xsl:template match="company"/>
<xsl:template match="name"/>
<xsl:template match="note"/>

<xsl:template match="note">
  <xsl:for-each select=".">
   <xsl:choose>
     <xsl:when test="@type='d.o.b'">
       <font color="1e90ff">Birthdate</font>: <xsl:value-of select="."/>
       <br/>
     </xsl:when>
     
     <xsl:when test="@type='messenger'">
       <font color="1e90ff">Instant Messenger IDs: </font> 
       <xsl:value-of select="."/>
       <br/>
     </xsl:when>
     
     <xsl:when test="@type='timestamp'">
       <font color="1e90ff">Last Modified: </font> <xsl:value-of select="."/>
       <br/>
     </xsl:when>
     
     <xsl:when test="@type='www'">
     
       <font color="1e90ff">URL: </font>
       <xsl:variable name="url">
          <xsl:value-of select="."/>
       </xsl:variable>
       <a href="{$url}"><xsl:value-of select="$url"/></a>
       <br/>
     </xsl:when>
     
     <xsl:when test="@type='photo'">
       <font color="1e90ff">Photo: </font>
       <xsl:variable name="photo">
          <xsl:value-of select="."/>
       </xsl:variable>
       <a href="pics/{$photo}"><xsl:value-of select="$photo"/></a>
       <br/>
     </xsl:when> 
   </xsl:choose>
   </xsl:for-each>
</xsl:template>

<xsl:template match="nots">
   <center>
      <table width="99%" cellpadding="3" cellspacing="1" border="1">
         <xsl:for-each select="not">
	<tr bgcolor="ebffed">
	 <td>
             <font color="ff0000">
                <i><xsl:value-of select="."/></i>
             </font>
         </td></tr>
         </xsl:for-each>
      </table>
   </center>
</xsl:template>

</xsl:stylesheet>
