<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   
    <xsl:template match="/">
        <html>
            <head>
                <title>
                    The Weavers
                </title>
            </head>
            <body>
                <h1>
                    The Weavers
                </h1>
                <table BORDER="1" align="center">
                 <tr bgcolor="#FFFF00" align="center"> 
                        <td>Name</td>
                        <td>Description</td>
                        <td>Phone</td>
                        <td>Number of Magazines</td>
                    </tr>                     
                 <xsl:apply-templates/>
                </table>     
            </body>
        </html>
    </xsl:template>
    
    <xsl:template match="weaver">
       <tr align="center">
          <td><xsl:value-of select="name"/></td>
          <td><xsl:apply-templates select="about"/></td>
          <td><xsl:apply-templates select="about/address"/></td>
          <td ><xsl:apply-templates select="magazines"/></td>          
       </tr>
   </xsl:template>
   
   <xsl:template match="about">
        <xsl:value-of select="description"/>  
   </xsl:template> 
    
   <xsl:template match="about/address">
        <xsl:value-of select="phone"/>  
   </xsl:template> 
   
   <xsl:template match="magazines">
        <xsl:value-of select="count(magazine/title)"/>  
   </xsl:template>    
   
     
  
 </xsl:stylesheet>


