<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- Template 1 -->
<xsl:template match='/'>
  <html> 
  <xsl:apply-templates /> 
</html>
</xsl:template>

<!-- Template 2 -->
<xsl:template match='catalog'>
  <head><title><xsl:value-of select='nombre' /> (Generado por books2.xsl)</title>
  <link rel="stylesheet" type="text/css" href="../archivos/books.css" 
              title="Style"/>
  </head>
  
  <body>

    <h1><xsl:value-of select='nombre' /> </h1>
    
    <h2>Teléfono: <xsl:value-of select='telefono' /> </h2>

    <h2>Libros en existencia </h2>
    <table style="border:1px solid black;">
      <tr class="denso">
           <td>Autor</td><td>Título</td><td>Género</td><td>Precio</td>
	   <td>Fecha de publicacion</td><td>Descripción</td>
       </tr>
      <!-- se usa el atributo "select" apara indicar que se incluyan sólo a esta etiqueta -->
      <xsl:apply-templates select='book' />
    </table>
  </body>
</xsl:template>

<!-- Template 3 -->

<xsl:template match='book'>
  <tr><xsl:apply-templates /></tr>
</xsl:template>


<!-- Template 4 -->
<xsl:template match='description|author|title|genre|price|publish_date'>
  <td><xsl:apply-templates /></td>
</xsl:template>



</xsl:stylesheet>
