home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 2004 March / data / PCD0304_1.7z / PCD0304_1 / files / trials / namo55 / Document / address.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2000-06-27  |  1.4 KB  |  55 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3.  
  4. <xsl:template match="/">
  5. <html>
  6.     <xsl:apply-templates select="namoaddress"/>    
  7. </html>
  8. </xsl:template>
  9.  
  10.  
  11. <xsl:template match="namoaddress">
  12.  
  13. <head>
  14.     <title><xsl:value-of select="namotitle"/></title>
  15.     <link rel="StyleSheet" href="address.css"/>
  16. </head>
  17.  
  18. <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
  19.  
  20. <h2><p align="center"><xsl:value-of select="namotitle"/></p></h2>
  21. <table border="0" cellpadding="3" cellspacing="2" align="center">
  22. <tr>
  23.     <th width="100" align="center"><p>Name</p></th>
  24.     <th width="150" align="center"><p>Home</p></th>
  25.     <th width="150" align="center"><p>Mobile Phone</p></th>
  26.     <th width="200" align="center"><p>Address</p></th>
  27.     <th width="150" align="center"><p>Dept</p></th>
  28. </tr>
  29.  
  30. <!-- Retrieving Data -->
  31. <xsl:apply-templates select="item" order-by="name"/>
  32. <!-- End of Retrieving Data -->
  33. </table>
  34.  
  35. </body>
  36.  
  37. </xsl:template>
  38.  
  39.  
  40. <xsl:template match="item">
  41. <tr>
  42. <td align="center" width="100">
  43. <xsl:value-of select="name"/>
  44. </td>
  45. <td align="center" width="150"><xsl:value-of select="phone/home"/></td>
  46. <td align="center" width="150"><xsl:value-of select="phone/mobile"/></td>
  47. <td align="center" width="200"><xsl:value-of select="address"/></td>
  48. <td align="center" width="150"><xsl:value-of select="dept"/></td>
  49. </tr>
  50. </xsl:template>
  51.  
  52. </xsl:stylesheet>
  53.  
  54.  
  55.