<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
  xmlns:c="http://livestoryboard.com/lsb/schemas/2003/03/content" 
  xmlns="http://livestoryboard.com/lsb/schemas/2003/03/xhtml1" 
  xmlns:w="http://schemas.microsoft.com/office/word/2003/2/wordml" 
  xmlns:v="urn:schemas-microsoft-com:vml" 
  xmlns:w10="urn:schemas-microsoft-com:office:word" 
  xmlns:SL="http://schemas.microsoft.com/schemaLibrary/2003/2/core" 
  xmlns:aml="http://schemas.microsoft.com/aml/2001/core" 
  xmlns:wx="http://schemas.microsoft.com/office/word/2003/2/auxHint" 
  xmlns:o="urn:schemas-microsoft-com:office:office" 
  xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 
  xmlns:st1="urn:schemas-microsoft-com:office:smarttags" 
  exclude-result-prefixes="w v w10 SL aml wx o dt st1">

  <xsl:output method="xml" indent="no" encoding="utf-8"/>

  <xsl:strip-space elements="*"/>

  <xsl:template match="*">
    <xsl:message>
      <xsl:value-of select="name(.)"/>
      <xsl:text> encountered, but no template matches.
        </xsl:text>
    </xsl:message>
    <span style="color:red">
      <xsl:text>&lt;</xsl:text>
      <xsl:value-of select="name(.)"/>
      <xsl:text>&gt;</xsl:text>
      <xsl:apply-templates/>
      <xsl:text>&lt;/</xsl:text>
      <xsl:value-of select="name(.)"/>
      <xsl:text>&gt;</xsl:text>
    </span>
  </xsl:template>
  
  <xsl:template match="o:SmartTagType | o:DocumentProperties | w:fonts | w:lists | w:styles | aml:annotation | w:shapeDefaults | w:docPr | w:sectPr | w:pPr | w:proofErr"/>
  
  <xsl:template match="w:wordDocument">
    <c:article>
      <xsl:apply-templates/>
    </c:article>
  </xsl:template>
  
  <xsl:template match="w:body">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="wx:sect">
    <c:section>
      <xsl:apply-templates/>
    </c:section>
  </xsl:template>
  
  <xsl:template match="wx:sub-section">
    <c:section>
      <xsl:apply-templates/>
    </c:section>
  </xsl:template>
  
  <xsl:template match="aml:annotation[@w:type='Word.Insertion']">
    <xsl:value-of select="aml:content/w:r/w:t"/>
  </xsl:template>
  
  <xsl:template match="wx:pBdrGroup">
    <xsl:if test="boolean(w:p)">
      <c:important>
        <xsl:apply-templates select="w:p"/>
      </c:important>
    </xsl:if>
  </xsl:template>
  
  
  <xsl:template match="w:p[w:pPr/w:pStyle[starts-with(@w:val, 'Head')]]">
    <xsl:if test="boolean(w:r/w:t)">
      <c:title>
        <xsl:apply-templates select="*"/>
      </c:title>
    </xsl:if>
  </xsl:template>
  
  <xsl:template match="w:p[w:pPr/w:pStyle[@w:val='BodyText']]">
    <xsl:if test="boolean(w:r/w:t)">
      <P>
        <xsl:apply-templates select="*"/>
      </P>
    </xsl:if>
  </xsl:template>
  
  
  
  
  
  
  
  
  <!--
  
  -->

  
  
  <xsl:template match="w:p[w:pPr/w:pStyle[contains(@w:val,'Bullet')]]">
  
    <xsl:if test="boolean(w:r/w:t)">
      <xsl:choose>
        <xsl:when test="w:pPr/w:pStyle[@w:val='ListBullet']">
        
          <xsl:if test="not(preceding-sibling::w:p[1]/w:pPr/w:pStyle[@w:val='ListBullet'])">
  
            <UL>
            
              <xsl:apply-templates select="." mode="base_list">
                <xsl:with-param name="stop" select="'false'"/>
              </xsl:apply-templates>
        
            </UL>
      
          </xsl:if>
        
        </xsl:when>
        
        <xsl:when test="w:pPr/w:pStyle[@w:val='Bullet']">
        
          <xsl:if test="not(preceding-sibling::w:p[1]/w:pPr/w:pStyle[@w:val='Bullet'])">
  
            <UL>
            
              <xsl:apply-templates select="." mode="base_list">
                <xsl:with-param name="stop" select="'false'"/>
              </xsl:apply-templates>
        
            </UL>
      
          </xsl:if>
        
        </xsl:when>  
        
        <xsl:when test="w:pPr/w:pStyle[@w:val='Bullet1']">
        
          <xsl:if test="not(preceding-sibling::w:p[1]/w:pPr/w:pStyle[@w:val='Bullet1'])">
  
            <UL>
            
              <xsl:apply-templates select="." mode="base_list">
                <xsl:with-param name="stop" select="'false'"/>
              </xsl:apply-templates>
        
            </UL>
      
          </xsl:if>
        
        </xsl:when> 
            
       <xsl:otherwise></xsl:otherwise>
      </xsl:choose>
    </xsl:if>
    
  </xsl:template>

  
  <xsl:template match="w:p" mode="base_list">
  
    <xsl:param name="stop"/>
    
    <xsl:if test="$stop='false'">
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list">
        <xsl:with-param name="stop" select="'true'"/>
      </xsl:apply-templates>
    </xsl:if>
  
  </xsl:template>
  
  
  <xsl:template match="w:p[w:pPr/w:pStyle[@w:val='Bullet']]" mode="base_list">
  
    <xsl:param name="stop"/>
    
    <xsl:if test="$stop='false'">

      <LI>
    
        <xsl:apply-templates select="*"/>
        
        <xsl:if test="contains(following-sibling::w:p[1]/w:pPr/w:pStyle/@w:val, 'Bullet2') or contains(following-sibling::w:p[1]/w:pPr/w:pStyle/@w:val, 'bulletsub')">
  
          <UL>
          
            <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list2">
              <xsl:with-param name="stop" select="'false'"/>
            </xsl:apply-templates>
      
          </UL>
    
        </xsl:if>
        
      </LI>
      
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list">
        <xsl:with-param name="stop" select="'false'"/>
      </xsl:apply-templates>
      
    </xsl:if>
        
  </xsl:template>
  
  <xsl:template match="w:p[w:pPr/w:pStyle[@w:val='Bullet1']]" mode="base_list">
  
    <xsl:param name="stop"/>
    
    <xsl:if test="$stop='false'">

      <LI>
    
        <xsl:apply-templates select="*"/>
        
        <xsl:if test="contains(following-sibling::w:p[1]/w:pPr/w:pStyle/@w:val, 'Bullet2') or contains(following-sibling::w:p[1]/w:pPr/w:pStyle/@w:val, 'bulletsub')">
  
          <UL>
          
            <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list2">
              <xsl:with-param name="stop" select="'false'"/>
            </xsl:apply-templates>
      
          </UL>
    
        </xsl:if>
        
      </LI>
      
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list">
        <xsl:with-param name="stop" select="'false'"/>
      </xsl:apply-templates>
      
    </xsl:if>
        
  </xsl:template>
    
  <xsl:template match="w:p[w:pPr/w:pStyle[@w:val='ListBullet']]" mode="base_list">
  
    <xsl:param name="stop"/>
    
    <xsl:if test="$stop='false'">

      <LI>
    
        <xsl:apply-templates select="*"/>
        
        <xsl:if test="following-sibling::w:p[1]/w:pPr/w:pStyle/@w:val='ListBullet2' or following-sibling::w:p[1]/w:pPr/w:pStyle/@w:val='bulletsub'">
  
          <UL>
          
            <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list2">
              <xsl:with-param name="stop" select="'false'"/>
            </xsl:apply-templates>
      
          </UL>
    
        </xsl:if>
        
      </LI>
      
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list">
        <xsl:with-param name="stop" select="'false'"/>
      </xsl:apply-templates>
      
    </xsl:if>
        
  </xsl:template>
  


  <xsl:template match="w:p" mode="base_list2">
  
    <xsl:param name="stop"/>
    
    <xsl:if test="$stop='false'">
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list2">
        <xsl:with-param name="stop" select="'true'"/>
      </xsl:apply-templates>
    </xsl:if>
  
  </xsl:template>
  
  
  <xsl:template match="w:p[w:pPr/w:pStyle[@w:val='ListBullet2']]" mode="base_list2">

    <xsl:param name="stop"/>

    <xsl:if test="$stop='false'">

      <LI>
    
       <xsl:apply-templates select="*"/>
        
      </LI>
      
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list2">
        <xsl:with-param name="stop" select="'false'"/>
      </xsl:apply-templates>
      
    </xsl:if>
    
        
  </xsl:template>

  <xsl:template match="w:p[w:pPr/w:pStyle[@w:val='bulletsub']]" mode="base_list2">

    <xsl:param name="stop"/>

    <xsl:if test="$stop='false'">

      <LI>
    
       <xsl:apply-templates select="*"/>
        
      </LI>
      
      <xsl:apply-templates select="following-sibling::w:p[1]" mode="base_list2">
        <xsl:with-param name="stop" select="'false'"/>
      </xsl:apply-templates>
      
    </xsl:if>
    
        
  </xsl:template>


    
  
  <xsl:template match="w:p">
    <xsl:if test="boolean(w:r/w:t)">
      <P>
        <xsl:apply-templates select="*"/>
      </P>
    </xsl:if>
  </xsl:template>
  

  <xsl:template match="st1:State | st1:place | st1:address | st1:PostalCode | st1:Street | st1:City | st1:PersonName | st1:country-region | st1:PlaceType | st1:PlaceName |  st1:date">
    <xsl:apply-templates/>
  </xsl:template>            
  
  
  
  <xsl:template match="w:hlink">
    <c:extA possible="hyperlink">
      <xsl:apply-templates select="*"/>
    </c:extA>
  </xsl:template>
  
  <xsl:template match="w:r">
  
    <xsl:choose>
      <xsl:when test="boolean(w:rPr/w:color[@w:val='FF0000'])">
        <c:intA >
          <xsl:apply-templates select="w:t"/>
        </c:intA>
      </xsl:when>
      <xsl:when test="boolean(w:rPr/w:i)">
        <EM >
          <xsl:apply-templates select="w:t"/>
        </EM>
      </xsl:when>
      <xsl:when test="boolean(w:rPr/w:b)">
        <STRONG >
          <xsl:apply-templates select="w:t"/>
        </STRONG >
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates select="w:t"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="w:t">
    
    <xsl:value-of select="."/>
    
  </xsl:template>
  
  <xsl:template match="w:tbl">
    <c:TABLE>
      <xsl:apply-templates select="w:tr"/>
    </c:TABLE>
  </xsl:template>
  
  <xsl:template match="w:tr">
    <xsl:choose>
      <xsl:when test="boolean(following-sibling::w:tr/w:trPr/w:tblHeader)">
        <c:CAPTION>
          <xsl:apply-templates select="w:tc/w:p/*"/>
        </c:CAPTION>
      </xsl:when>
      <xsl:when test="boolean(w:trPr/w:tblHeader)">
        <c:THEAD>
          <c:TR>
            <xsl:apply-templates select="w:tc"/>
          </c:TR>
        </c:THEAD>
      </xsl:when>
      <xsl:otherwise>
        <c:TR>
          <xsl:apply-templates select="w:tc"/>
        </c:TR>
      </xsl:otherwise>
    </xsl:choose>
    
  </xsl:template>
  
  <xsl:template match="w:tc">
    
    <c:TD>
      <xsl:if test="boolean(w:tcPr/w:gridSpan)">
        <xsl:attribute name="colspan">
          <xsl:value-of select="w:tcPr/w:gridSpan/@w:val"/>
        </xsl:attribute>
      </xsl:if>
      <xsl:apply-templates select="w:p"/>
    </c:TD>
  </xsl:template>
  
  
</xsl:stylesheet>
