home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
-
- <xsl:template match="/">
- <html>
- <xsl:apply-templates select="namoaddress"/>
- </html>
- </xsl:template>
-
-
- <xsl:template match="namoaddress">
-
- <head>
- <title><xsl:value-of select="namotitle"/></title>
- <link rel="StyleSheet" href="address.css"/>
- </head>
-
- <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
-
- <h2><p align="center"><xsl:value-of select="namotitle"/></p></h2>
- <table border="0" cellpadding="3" cellspacing="2" align="center">
- <tr>
- <th width="100" align="center"><p>Name</p></th>
- <th width="150" align="center"><p>Home</p></th>
- <th width="150" align="center"><p>Mobile Phone</p></th>
- <th width="200" align="center"><p>Address</p></th>
- <th width="150" align="center"><p>Dept</p></th>
- </tr>
-
- <!-- Retrieving Data -->
- <xsl:apply-templates select="item" order-by="name"/>
- <!-- End of Retrieving Data -->
- </table>
-
- </body>
-
- </xsl:template>
-
-
- <xsl:template match="item">
- <tr>
- <td align="center" width="100">
- <xsl:value-of select="name"/>
- </td>
- <td align="center" width="150"><xsl:value-of select="phone/home"/></td>
- <td align="center" width="150"><xsl:value-of select="phone/mobile"/></td>
- <td align="center" width="200"><xsl:value-of select="address"/></td>
- <td align="center" width="150"><xsl:value-of select="dept"/></td>
- </tr>
- </xsl:template>
-
- </xsl:stylesheet>
-
-
-