<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl" result-ns="html">
<xsl:template match="/">
<html>
   <head>
      <title>Persian Rug
      </title>
</head>
<body style="background:url(images\gray.jpg);">
<h2 style="text-align: center; font-size: 26pt; color: #0588aa; 
font-family: roman;">Persian Rugs</h2>
<br/>
<table align="center" cellspacing="10" border="1">
<xsl:for-each select="rug_cities/rug">


<tr>
   
</tr>
<tr>
<td>
<table style="background:url(images\in_03.jpg); font-size: 11pt; text=align: center; font-family: roman;" align="center" width="90%" height="200" border="1" cellspacing="10" >
    
    
    <tr style="background-color: #ccddee; color: blue; 
             ">
        <th>Picture</th>
        <th>rug</th>
        <th>web</th>
      

       </tr>
       <tr style="color: #445533; align: center;">
          <td align="center"><xsl:apply-templates select="description/picture"/>
       </td>
         <td style= "color: brown; 
        " >
         <i><b><xsl:value-of select="name_info/name"/></b></i></td>
        <td style="color:brown;" colspan="2" align="center"><xsl:for-each select="name_info/site">

        <i><b><xsl:apply-templates select="webpage"/></b></i></xsl:for-each></td>
   
         </tr>
         <tr style=" background-color: #ccddee; color: blue;">
        
        <th>Info</th>
        <th>Pattern</th>
        <th>Color</th>
        
        </tr>
       <tr style="color: #445533; align: center;">
         <td style="color: brown;">
         <i><b><xsl:value-of select="description/info"/></b></i></td>
         <td style="color: brown;">
         <i><b><xsl:value-of select="description/pattern"/></b></i></td>
         <td style="color: brown;">
         <i><b><xsl:value-of select="description/color"/></b></i></td>
        
         </tr>
            <tr style=" background-color: #ccddee; color: blue;">
        
        <th>Size</th>
        <th>Pile</th>
        <th>Price</th>
        </tr>
       <tr style="color: #445533; align: center;">
         
         <td style="color: brown;">
         <i><b><xsl:value-of select="description/size"/></b></i></td>
         <td style="color: brown;">
         <i><b><xsl:value-of select="description/pile"/></b></i></td>
         <td style="color: brown;" align="center">
         <i><b><xsl:value-of select="description/price"/></b></i></td> 
         </tr>
        


							
 </table>
</td>
</tr>
</xsl:for-each>
   
 </table>

 </body>
</html>

</xsl:template>

  
 
<!--       "picture" template         -->
<xsl:template match="description/picture">
<img>
 <xsl:attribute name="src">
<xsl:value-of select="./@filename"/>
</xsl:attribute>
 <xsl:attribute name="width">
      <xsl:value-of select="./@x"/>
    </xsl:attribute>
    <xsl:attribute name="height">
      <xsl:value-of select="./@y"/>
    </xsl:attribute>
</img>
</xsl:template>
<!--"web page" template-->
<xsl:template match="webpage">
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@filename"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:value-of select="_blank"/>
</xsl:attribute><xsl:value-of select="./@filename"/>
</a>
</xsl:template>
</xsl:stylesheet>

