<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

    <xsl:template match="/">
        <HTML>
            <HEAD>
                <LINK HREF="ie.css" REL="stylesheet"/>
            </HEAD>
            <BODY TOPMARGIN="3" LEFTMARGIN="3" MARGINHEIGHT="0" MARGINWIDTH="0" BGCOLOR="#FFFFFF">
                <DIV ID="ResultDiv"></DIV>
                <TABLE WIDTH="500">
                    <TR>
                        <TD>
                            <xsl:apply-templates/>
                        </TD>
                    </TR>
                </TABLE>
            </BODY>
        </HTML>
    </xsl:template>

    <xsl:template match="*[node()]">
      <DIV STYLE="margin-left:1em">
        <SPAN STYLE="color:#354b75">&lt;<xsl:node-name/><xsl:apply-templates select="@*"/>></SPAN><xsl:apply-templates select="node()"/><SPAN STYLE="color:#354b75">&lt;/<xsl:node-name/>></SPAN>
      </DIV>
    </xsl:template>

    <xsl:template match="@*">
      <SPAN STYLE="color:navy"><xsl:node-name/>="<SPAN STYLE="color:black"><xsl:value-of/></SPAN>"</SPAN>
    </xsl:template>

    <xsl:template match="cdata()">
        <PRE><xsl:value-of/></PRE>
    </xsl:template>

    <xsl:template match="verbatim">
        <TT><xsl:apply-templates/></TT>
    </xsl:template>

    <xsl:template match="textnode()">
      <xsl:value-of/>
    </xsl:template>

    <xsl:template match="code">
        <PRE><xsl:apply-templates/></PRE>
    </xsl:template>

    <xsl:template match="figure">
        <DIV STYLE="background-color:#F0F0F0;">
          <xsl:apply-templates/>
        </DIV>
    </xsl:template>

    <xsl:template match="title">
        <H3>
          Unknown Title:<xsl:apply-templates/>
        </H3>
    </xsl:template>
    
    <xsl:template match="article/title">
        <H1>
          <xsl:apply-templates/>
        </H1>
    </xsl:template>
    
    <xsl:template match="section/title">
        <H2>
          <xsl:apply-templates/>
        </H2>
    </xsl:template>

    <xsl:template match="caption/title">
        <DIV style="background-color:#COCOCO;font-size:8pt;font-style:italic;">
          <xsl:apply-templates/>
        </DIV>
    </xsl:template>

    <xsl:template match="p">
        <P><xsl:apply-templates/></P>
    </xsl:template>

    <xsl:template match="author/name">
        <P style="font-style:italic">By <xsl:apply-templates/></P>
    </xsl:template>
    
    <xsl:template match="author">
      <xsl:apply-templates/>
    </xsl:template>

    <xsl:template match="list-item">
        <LI><xsl:apply-templates/></LI>
    </xsl:template>
    
    <xsl:template match="section">
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="list">
        <UL><xsl:apply-templates/></UL>
    </xsl:template>
    
    <xsl:template match="list[type='ul']">
        <UL><xsl:apply-templates/></UL>
    </xsl:template>
    
    <xsl:template match="list[type='ol']">
        <OL><xsl:apply-templates/></OL>
    </xsl:template>

    <xsl:template match="emphasis">
        <SPAN style="font-style:italic;"><xsl:apply-templates/></SPAN>
    </xsl:template>
    
    <xsl:template match="quote">
        "<xsl:apply-templates/>"
    </xsl:template>
    
    <xsl:template match="quote/quote">
        '<xsl:apply-templates/>'
    </xsl:template>
    
    <xsl:template match="pull-quote">
        <B><xsl:apply-templates/></B>
    </xsl:template>
    
    <xsl:template match="abstract/p">
        <P><xsl:apply-templates/></P>
    </xsl:template>

    <xsl:template match="abstract">
      <HR SIZE="1" />
      <DIV STYLE="font-style:italic; font-size:10pt">
      <DIV STYLE="font-size:12pt;font-weight:bold;">Abstract</DIV>
        <xsl:apply-templates/>
      </DIV>
      <HR SIZE="1" />
    </xsl:template>

    <xsl:template match="access">
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="access[@type='url']">
      <xsl:element name="A">
        <xsl:attribute name="HREF"><xsl:value-of/></xsl:attribute><xsl:value-of/></xsl:element>
    </xsl:template>
    
    <xsl:template match="contact-info/access[@type='url']">
        <TR><TD>Url</TD><TD>
          <xsl:element name="A">
            <xsl:attribute name="HREF"><xsl:value-of/></xsl:attribute><xsl:value-of/></xsl:element>
        </TD></TR>
    </xsl:template>
    
    <xsl:template match="contact-info/access[@type='voice']">
        <TR><TD>Phone</TD><TD><xsl:apply-templates/></TD></TR>
    </xsl:template>
    
    <xsl:template match="contact-info/access[@type='fax']">
        <TR><TD>Fax</TD><TD><xsl:apply-templates/></TD></TR>
    </xsl:template>
    
    <xsl:template match="access[@type='e-mail']">
          <xsl:element name="A">
            <xsl:attribute name="HREF">mailto:<xsl:value-of/></xsl:attribute><xsl:value-of/></xsl:element>
    </xsl:template>
    
    <xsl:template match="contact-info/access[@type='e-mail']">
        <TR><TD>Email</TD><TD>
          <xsl:element name="A">
            <xsl:attribute name="HREF">mailto:<xsl:value-of/></xsl:attribute><xsl:value-of/>
          </xsl:element>
        </TD></TR>
    </xsl:template>
    <xsl:template match="contact-info/contact">
        <TR><TD>Contact</TD><TD><xsl:apply-templates/></TD></TR>
    </xsl:template>
    
    <xsl:template match="contact-info/company">
        <TR><TD>Company</TD><TD><xsl:apply-templates/></TD></TR>
    </xsl:template>
    
    <xsl:template match="contact-info">
        <H4>Contact Information</H4>
        <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
        <COL WIDTH="80"/>
          <xsl:apply-templates/>
        </TABLE>
    </xsl:template>

    <xsl:template match="short-bio">
      <DIV STYLE="background-color:#F0F0F0; margin-left:3pc; margin-right:6pc; font-style:italic; font-size:8pt">
        <xsl:apply-templates/>
      </DIV>
    </xsl:template>

    <xsl:template match="caption">
      <xsl:apply-templates/>
    </xsl:template>

    <xsl:template match="acr"><xsl:value-of/></xsl:template>
   
    <xsl:template match="acr[@def]"><xsl:element name="SPAN">
          <xsl:attribute name="TITLE"><xsl:value-of select="@def"/></xsl:attribute>
          <xsl:attribute name="STYLE">
              cursor:hand;background-color:#EEEEEE
          </xsl:attribute><xsl:value-of/></xsl:element></xsl:template>
   
    <xsl:template match="acr/@def">
      (<xsl:value-of/>)
    </xsl:template>
    
    <xsl:template match="article">
      <xsl:if test="*[@type='feature']">
          <DIV STYLE="font-align:center;"><IMG SRC="tag-feature.gif"/></DIV>
      </xsl:if>
      <xsl:if test="*[@type='editorial']">
          <DIV STYLE="font-align:center;"><IMG SRC="tag-editorial.gif"/></DIV>
      </xsl:if>
      <xsl:if test="*[@type='tutorial']">
          <DIV STYLE="font-align:center;"><IMG SRC="tag-tutorial.gif"/></DIV>
      </xsl:if>
      <xsl:if test="*[@type='tip']">
          <DIV STYLE="font-align:center;"><IMG SRC="tag-tip.gif"/></DIV>
      </xsl:if>
      <xsl:if test="*[@type='rumor']">
          <DIV STYLE="font-align:center;"><IMG SRC="tag-slotnik.gif"/></DIV>
      </xsl:if>
      <xsl:if test="*[@type='news']">
          <DIV STYLE="font-align:center;"><IMG SRC="tag-news.gif"/></DIV>
      </xsl:if>
      <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="footnote">
        <xsl:element name="SPAN">
          <xsl:attribute name="TITLE">
              <xsl:value-of/>
          </xsl:attribute>
          [fn]
        </xsl:element>
    </xsl:template>
    
    
    <xsl:template match="graphic">
        <xsl:element name="IMG">
            <xsl:attribute name="SRC"><xsl:value-of select="@name"/></xsl:attribute>
        </xsl:element>
    </xsl:template>
    
</xsl:stylesheet>
