<?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="4" cellspacing="0" border="1" style="border-collapse:collapse;" class="ForumText">
      <tr  style="text-align:center;background:#E7EBF7;height:22px;">
        <td style="width:120px;">Thành viên</td>
        <td>Trả lời</td>
      </tr>
      <xsl:apply-templates select="Reply"></xsl:apply-templates>
    </table>
  </xsl:template>

  <!-- one Reply -->
  <xsl:template match="Reply">
    <tr>
      <xsl:if test="odd=''">
        <xsl:attribute name="style">background:#F0F6FC</xsl:attribute>
      </xsl:if>
      <td style="text-align:center;width:20%;" valign="top">
        <a>
          <xsl:attribute name="href">
            <xsl:value-of select="url_profile"></xsl:value-of>
          </xsl:attribute>
          <xsl:value-of select="UserName"></xsl:value-of>
        </a>
        <br/>
        <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>
          <br/>
        </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 src="images/edit.gif" border="0" />
            </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 src="images/quote.gif" border="0" />
            </a>
          </xsl:if>
        </div>
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet> 

