home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / V XML / VXML.EXE / {app} / samples / employees.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-11  |  753 b   |  26 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0"
  3.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4. <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
  5.     <xsl:template match="/">
  6.         <p>Here is the employee list</p>
  7.         <table border="0">
  8.             <tr>
  9.                 <td>Name</td>
  10.                 <td>Position</td>
  11.                 <td>Email</td>
  12.             </tr>
  13.                 <xsl:apply-templates select="company"/>
  14.         </table>
  15.     </xsl:template>
  16.     
  17.     <xsl:template match="company">
  18.         <xsl:for-each select="employee">
  19.             <tr>
  20.                 <td><xsl:value-of select="name"/></td>
  21.                 <td><xsl:value-of select="position"/></td>
  22.                 <td><xsl:value-of select="email"/></td>
  23.             </tr>
  24.         </xsl:for-each>    
  25.     </xsl:template>
  26. </xsl:stylesheet>