element-available('xsl:odorama') : element available « XSLT stylesheet « XML






element-available('xsl:odorama')


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="6">
  <xsl:template match="title">
    <xsl:choose>
      <xsl:when test="element-available('xsl:odorama')">
        
      </xsl:when>
      <xsl:otherwise>
        <xsl:message>
          xsl:odorama element not supported.
        </xsl:message>
      </xsl:otherwise>
    </xsl:choose>
    Title:
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="chapter/title">
    Chapter title:
    <xsl:apply-templates />
  </xsl:template>

</xsl:stylesheet>

Output:

<?xml version="1.0" encoding="UTF-8"?>
  
    
      J
      A
      S
    
    
      1 Drive
      Vancouver
      BC
      80210
    
    
      303-4668903
      222-222222
      303-4667357
    
    j@hotmail.com
  

 








Related examples in the same category