﻿<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="Persons">
    <html>
      <head>
        <title>Osoby</title>
        <style>
          body{
            font-family: verdana;
          }
          table{
            border-collapse:collapse;
            border-spacing:0;
            font-size:10px;
            table-layout:auto;
            text-align:left;
          }
          table th, table td{
            border:1px solid #D1D2D3;
            padding: 5px;
          }
        </style>
      </head>
      <body>
        <table>
          <thead>
            <th>Id</th>
            <th>Imię</th>
            <th>Nazwisko</th>
            <th>Wiek</th>
          </thead>
          <tbody>
            <xsl:for-each select="Person">
              <xsl:sort select="PersonId"/>
              <tr>
                <td>
                  <xsl:value-of select="PersonId"/>
                </td>
                <td>
                  <xsl:value-of select="FirstName"/>
                </td>
                <td>
                  <xsl:value-of select="LastName"/>
                </td>
                <td>
                  <xsl:value-of select="Age"/>
                </td>
              </tr>              
            </xsl:for-each>
          </tbody>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>


