Answer 9: Predicates

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:template match="/">
    <html>
        <head>
           <title>Transuranium Elements</title>
        </head>
        <body>
        <ul>
          <xsl:apply-templates select="descendant::ATOM[ATOMIC_NUMBER > 92]"/>
         </ul>
         </body>
    </html>
  </xsl:template>

  <xsl:template match="ATOM">
    <li><xsl:value-of select="NAME"/></li>
  </xsl:template>
  
</xsl:stylesheet>

You can find this example in examples/atoms14.xsl


View Transformed Document in Browser
Previous | Next | Top | Cafe con Leche

Copyright 2002 Elliotte Rusty Harold
Elliotte Rusty Harold
Last Modified October 16, 2002