home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:b="http://www.xmlspy.com/schemas/Altova/orgchart">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" indent="no" media-type="text/html"/>
- <!--XSL Stylesheet for generating simple Orgchart-->
- <xsl:template match="b:Altova">
- <html>
- <head>
- <title>
- <xsl:value-of select="Name"/>
- </title>
- </head>
- <body>
- <h1>
- <xsl:value-of select="Name"/>
- </h1>
- <table width="100%">
- <xsl:for-each select="Division">
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </table>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="b:Altova/Division">
- <tr>
- <td>
- <hr/>
- <h2>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="URL"/></xsl:attribute>
- <xsl:value-of select="Name"/>
- </a>
- </h2>
- <p>
- <xsl:value-of select="Desc"/>
- </p>
- <table>
- <tr>
- <td>
- <h4>Title</h4>
- </td>
- <td>
- <h4>First</h4>
- </td>
- <td>
- <h4>Last</h4>
- </td>
- <td>
- <h4>Ext</h4>
- </td>
- <td>
- <h4>Club</h4>
- </td>
- </tr>
- <xsl:apply-templates select="b:Person|b:VIP"/>
- </table>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="b:Person">
- <tr>
- <td>
- <xsl:value-of select="Title"/>
- </td>
- <td>
- <xsl:value-of select="First"/>
- </td>
- <td>
- <b>
- <a>
- <xsl:attribute name="href">mailto:<xsl:value-of select="EMail"/></xsl:attribute>
- <xsl:value-of select="Last"/>
- </a>
- </b>
- </td>
- <td>
- <xsl:value-of select="PhoneExt"/>
- </td>
- <td/>
- </tr>
- </xsl:template>
- <xsl:template match="b:VIP">
- <tr bgcolor="yellow">
- <td>
- <xsl:value-of select="Title"/>
- </td>
- <td>
- <xsl:value-of select="First"/>
- </td>
- <td>
- <b>
- <a>
- <xsl:attribute name="href">mailto:<xsl:value-of select="EMail"/></xsl:attribute>
- <xsl:value-of select="Last"/>
- </a>
- </b>
- </td>
- <td>
- <xsl:value-of select="PhoneExt"/>
- </td>
- <td>
- <xsl:value-of select="Club"/>
- </td>
- </tr>
- </xsl:template>
- </xsl:stylesheet>
-