<?xml version='1.0'?>
<!--Tag above says this is xml; Tag below links to the XSL namespace-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">
<!--Define what to do for the root element, the doc-->
<!--We'll start an html page with a header and insert the doc's
    short title attribute in the header.  Then link to our
    CSS.  The body is created by applying all the templates below.
    Particularly useful in understanding this are pages 148 through
    169 of WEBMASTER IN A NUTSHELL by Spainhour & Eckstein, and the
    xsl tutorial by Grosso and Walsh at
    http://www.nwalsh.com/docs/tutorials/xsl/xsl/slides.html-->
<!--Note, this stylesheet was tested only in IE6 and worked just fine-->

<xsl:template match="doc">
 <HTML>
  <HEAD>
   <TITLE>
    <xsl:value-of select="@short_title"/>
   </TITLE>
   <link rel="stylesheet"
   href="HTTP://TAPESTRY.SPSU.EDU/DRRICH/CLASSES/IT6753/surstyle.css"
   type="text/css"/>
  </HEAD>
  <BODY>    
     <xsl:apply-templates/>
 <!--The above statement applies all the templates that appear within
    the scope of the doc, which is the element that contains all
    of the information in our report-->
  </BODY>
 </HTML>
</xsl:template>
<!--The template above processes the whole document element or doc--> 

<!--The template below processes the cover page, 
which is part of the doc-->
<xsl:template match="doc/cover">
  <h2 align="center">
     <xsl:value-of select="CP_TITLE"/>
  </h2>
  <h3 align="center">
    <xsl:value-of select="CP_AUTHOR_NAME"/>
    <br/>IT6753 Web Development
  </h3>
  <h4 align="center">Abstract</h4>
  <p>
    <xsl:value-of select="CP_ABSTRACT"/>
  </p>  
   <!--xsl:apply-templates/-->
</xsl:template>

<!--The template below processes the introduction section, 
which is (scoped to be) part of the doc-->
<xsl:template match="doc/intro">
  <h2>Introduction</h2>
  <xsl:apply-templates/>
</xsl:template>

<!--The template below processes the approach section, 
which is part of the doc-->
<xsl:template match="doc/approach">
  <h2>Approach</h2>
  <xsl:apply-templates/>
</xsl:template>

<!--The template below processes the findings section, 
which is part of the doc-->
<xsl:template match="doc/findings">
  <h2>Findings and My Analysis of Them</h2>
  <xsl:apply-templates/>
</xsl:template>

<!--The template below processes the recommendations section, 
which is part of the doc-->
<xsl:template match="doc/recommendations">
  <h2>Recommendations</h2>
  <xsl:apply-templates/>
</xsl:template>

<!--The template below processes the value section, 
which is part of the doc-->
<xsl:template match="doc/value">
  <h2>Value</h2>
  <xsl:apply-templates/>
</xsl:template>

<!--The template below processes the references and bibliography
section, which is part of the doc-->
<xsl:template match="doc/refsbib">
  <h2>References and Bibliography</h2>
  <xsl:apply-templates/>
</xsl:template>

<!--The template below implements a paragraph element, and
applies anywhere it is found-->
  <xsl:template match="*/para">
   <p><xsl:apply-templates/></p>
  </xsl:template>

<!--The template below implements an emphasis element, and
applies anywhere it is found-->
  <xsl:template match="*/emphasis">
   <i><xsl:apply-templates/></i>
  </xsl:template>

<!--You might add templates below to implements lists and tables
to apply anywhere it they are found.  (Hint-Nest the items and rows
inside the list and table much as elements are nested in the doc.
I've gotten you started below with processing of 
three tags for lists.-->

  <xsl:template match="*/order">
   <ol><xsl:apply-templates/></ol>
  </xsl:template>

  <xsl:template match="*/list">
   <ul><xsl:apply-templates/></ul>
  </xsl:template>

    <xsl:template match="order/item|list/item">
     <li><xsl:apply-templates/></li>
    </xsl:template>

<!--tag below ends the stylesheet-->
</xsl:stylesheet>
