home *** CD-ROM | disk | FTP | other *** search
/ XML Bible (2nd Edition) / XML_Bible_Second_Edition_Hungry_Minds_2001.iso / mac / source / 17 / 17-18.xsl < prev    next >
Extensible Markup Language  |  2001-02-05  |  926b  |  33 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" 
  3.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4.  
  5.     <xsl:template match="PERIODIC_TABLE">
  6.       <html>
  7.         <head>
  8.           <title>Atomic Number vs. Atomic Weight</title>
  9.         </head>
  10.         <body>
  11.           <h1>Atomic Number vs. Atomic Weight</h1>
  12.           <table>
  13.             <th>Element</th>
  14.             <th>Atomic Number</th>
  15.             <th>Atomic Weight</th>
  16.             <xsl:apply-templates>
  17.               <xsl:sort select="ATOMIC_NUMBER"/>
  18.             </xsl:apply-templates>
  19.           </table>
  20.         </body>
  21.       </html>
  22.     </xsl:template>
  23.  
  24.     <xsl:template match="ATOM">
  25.       <tr>
  26.         <td><xsl:apply-templates select="NAME"/></td>
  27.         <td><xsl:apply-templates select="ATOMIC_NUMBER"/></td>
  28.         <td><xsl:apply-templates select="ATOMIC_WEIGHT"/></td>
  29.       </tr>
  30.     </xsl:template>
  31.  
  32. </xsl:stylesheet>
  33.