<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/topic_show">
    <table width="100%" cellpadding="0" cellspacing="0">
      <xsl:apply-templates select="Reply"></xsl:apply-templates>
    </table>
  </xsl:template>

  <!-- one Reply -->
  <xsl:template match="Reply">
    <tr>
      <td>
        <table width="100%" style="border:1px solid #cccccc;border-collapse:collapse;" border="1" cellpadding="6" cellspacing="0">
          <tr>
            <td style="text-align:center;width:20%;background-color:#D5F7D6;" valign="top">
              <a>
                <xsl:attribute name="href">
                  <xsl:value-of select="url_profile"></xsl:value-of>
                </xsl:attribute>
                <b><xsl:value-of select="UserName"></xsl:value-of></b>
                <br/>
                <xsl:if test="ImageUrl!=''">
                  <img width="80" border="0">
                    <xsl:attribute name="src"><xsl:value-of select="ImageUrl"></xsl:value-of></xsl:attribute>
                  </img>
                  <br/>
                </xsl:if>
              </a>
              <xsl:value-of select="Slogan"></xsl:value-of>
              <br/>
              <xsl:value-of select="Posts"></xsl:value-of>&#xa0; bài
            </td>
            <td valign="top">
              <xsl:value-of select="PostedDate"></xsl:value-of>
              <br/>
              <xsl:value-of select="Content"  disable-output-escaping="yes"></xsl:value-of>
              <div style="text-align:right;">
                <!--edit-->
                <xsl:if test="url_edit!=''">
                  <a>
                    <xsl:attribute name="href">
                      <xsl:value-of select="url_edit"></xsl:value-of>
                    </xsl:attribute>
                    <xsl:attribute name="alt">Sửa bài viết</xsl:attribute>
                    <img>
                      <xsl:attribute name="border">0</xsl:attribute>
                      <xsl:attribute name="src">
                        <xsl:value-of select="/topic_show/root_folder"></xsl:value-of>/images/edit.gif
                      </xsl:attribute>
                    </img>
                  </a>
                </xsl:if>
                &#xa0;
                <!-- quote -->
                <xsl:if test="url_quote!=''">
                  <a>
                    <xsl:attribute name="href">
                      <xsl:value-of select="url_quote"></xsl:value-of>
                    </xsl:attribute>
                    <xsl:attribute name="alt">Trích dẫn bài viết này</xsl:attribute>
                    <img>
                      <xsl:attribute name="border">0</xsl:attribute>
                      <xsl:attribute name="src">
                        <xsl:value-of select="/topic_show/root_folder"></xsl:value-of>/images/quote.gif
                      </xsl:attribute>
                    </img>
                  </a>
                </xsl:if>
              </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td style="height:4px;"></td>
    </tr>
  </xsl:template>
</xsl:stylesheet>

