<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<!-- blogTEI - Francois Lachance - TEIblog-->

  <!-- this is a template to include in a XSLT file -->
  <!-- it is desiged to capture URL info  -->
  <!-- it aims to create a cell for insertion in an HTML table -->
  <!-- it targets markup of figure elements -->
  <!-- with entity attributes whose value is a URL -->
  <!-- with rend attributes whose value guides output -->

  <!-- see TEI Guidelines for more on the content model -->
  <!-- see Lynda Weinman's book for more on Hexdecimal numbers for colours -->
  <!-- see XSLT Recomendation for more on xsl:if -->

  <xsl:template match="figure">
    <xsl:if test="@rend='white_background'">
      <td bgcolor="#FFFFFF"><img src="{@entity}"/></td>
    </xsl:if>
    <xsl:if test="@rend='black_background'">
      <td bgcolor="#000000"><img src="{@entity}"/></td>
    </xsl:if>
  </xsl:template>

</xsl:stylesheet>
