Specifying Patterns for the match Attribute (6)


Testing with []

Example:   Name of the student with id 'js'

XSL Style Sheet:
   <?xml version="1.0"?> 
   <xsl:stylesheet version="1.0" 
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="course">
         <NAME>
            <xsl:apply-templates select="student"/>
         </NAME>
      </xsl:template>

      <xsl:template match="text()">
      </xsl:template>

      <xsl:template match="student[@id = 'js']">
         <xsl:value-of select="name"/> 
      </xsl:template>
   </xsl:stylesheet>