<?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="color:#ffffff;" background="/forum/template/ddth/category.gif">
              <xsl:value-of select="PostedDate"/>
            </td>
          </tr>
          <tr>
            <td>
              <table width="100%" cellpadding="4" cellspacing="0">
                <tr>
                  <td style="width:1%;" valign="top">
                    <a>
                      <xsl:attribute name="href">
                        <xsl:value-of select="url_profile"></xsl:value-of>
                      </xsl:attribute>
                      <xsl:if test="ImageUrl!=''">
                        <img width="80" border="0">
                          <xsl:attribute name="src"><xsl:value-of select="ImageUrl"></xsl:value-of></xsl:attribute>
                        </img>
                      </xsl:if>
                      <xsl:if test="ImageUrl=''">
                        <img src="images/noimage.gif" border="0" />
                      </xsl:if>
                    </a>
                  </td>
                  <td 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>
                    </a>
                    <xsl:if test="Slogan!=''">
                      <br/>
                      <xsl:value-of select="Slogan"></xsl:value-of>
                    </xsl:if>
                    <br/>
                    Sinh viên
                  </td>
                  <td style="width:10#;text-align:right;" valign="top">
                    Bài viết : <b><xsl:value-of select="Posts"></xsl:value-of></b>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td valign="top" style="background-color:#f9f9f9;">
              <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">/forum/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 border="0">
                      <xsl:attribute name="src">/forum/images/quote.gif</xsl:attribute>
                    </img>
                  </a>
                </xsl:if>
              </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td style="height:10px;"></td>
    </tr>
  </xsl:template>
</xsl:stylesheet>

