
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

  <xsl:output method="html"/>

<!-- blogTEI.xml - Francois Lachance - blogTEI.htm -->

<xsl:include href="illus.xsl"/>
<xsl:include href="hi.xsl"/>
<xsl:include href="lb.xsl"/>
<xsl:include href="list.xsl"/>
<xsl:include href="para.xsl"/>
<xsl:include href="quote.xsl"/>
<xsl:include href="ref.xsl"/>
<xsl:include href="title.xsl"/>

<xsl:include href="w.xsl"/>
<!--xsl:include href="w_next.xsl"/>-->

<xsl:include href="c_plus.xsl"/>
<!-- <xsl:include href="c_dash.xsl"/> -->

<xsl:include href="css_TEIblog.xsl"/>
<!-- <xsl:include href="css_BlogTEI.xsl"/>-->  


<xsl:template match="text">  

    <html>

      <head>

        <title>
          <xsl:value-of select="//title"/>
        </title>

        <xsl:call-template name="css"/>

</head>


<!-- body colour  set in a linked CSS -->
<!-- see twotone.css and reversetwotone.css -->

<body>


  <div class="title">
  <!-- a bit of lazy xpath // on the select attribute below -->
  <xsl:apply-templates select="//front/div/head/title"/></div>
  
  
    <!--  the entry  --> 
          <xsl:apply-templates select="//body/div"/>
   

     <!-- the footer -->
     <xsl:apply-templates select="//front/div/byline"/>
   

      </body>
    </html>

  <!-- commenting out the table generation of a figure. this will eveventually be used in the case of a blog entry with images -->
       <!--
<div>
    <table><tr><xsl:apply-templates select="//figure"/></tr></table>
  </div>
 -->
  
</xsl:template>


<xsl:template match="byline">
  <div class="byline"><xsl:apply-templates/></div>
</xsl:template>

<xsl:template match="div[@type='entry']" name="entry">
  <xsl:if test="head/num[@type='die_roll']='1' or head/num[@type='die_roll']='3'">
    <div class="entry">
      
      <a name="{concat(head/index[@ana='category']/@level1,head/num[@type='accession']) }"> </a>

<xsl:call-template name="entry_num"/>
      
<div class="entry_title"><xsl:apply-templates select="./head/title"/></div>
    <xsl:apply-templates select="p"/>

<xsl:call-template name="category"/>

</div>
</xsl:if>  
</xsl:template>

<xsl:template name="entry_num">
        <div class="entry_num"><xsl:apply-templates select="head/num[@type='accession']"/></div>
</xsl:template>


<xsl:template name="category">
    <div class="category"><xsl:value-of select="head/index/@level1"/></div>
  </xsl:template>


  
  <!-- suppresses teiHeader -->
  <xsl:template match="teiHeader">
  </xsl:template>

  <!-- suppresses note  -->
  <!-- need to finesse to capture <note> by attribute "type" -->
  <xsl:template match="note">
  </xsl:template>

  <xsl:template match="front">
   </xsl:template>

  <xsl:template match="back">
   </xsl:template>

</xsl:transform>

