﻿<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html"/>
  
  <xsl:template match="/newslist">
    <table width="100%" class="table table-striped">
      <thead class="thead-inverse">
        <tr>
          <td style="width:5%">ID</td>
          <td style="width:90%">Tên mục tin</td>
          <td style="width:5%">Sửa</td>
        </tr>
      </thead>
      <xsl:apply-templates select="news"></xsl:apply-templates>
    </table>
  </xsl:template>

  <xsl:template match="news">
    <tr>
      <td align="center">
        <xsl:value-of select="CategoryID"/>
      </td>
      <td align="left">
        <xsl:value-of select="CategoryName"/>
      </td>
      <td align="center">
        <a>
          <xsl:attribute name="href"><xsl:value-of select="link_edit"/></xsl:attribute>
          Sửa
        </a>
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet> 

