<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
  version="2.0">
  
  <description>
    A tag library to print out the ever-changing current
    and former company names (which are monitored by event
    listeners). From Core Servlets and JavaServer Pages Volume 2,
    http://volume2.coreservlets.com/.
  </description>
  <tlib-version>1.0</tlib-version>
  <short-name>company-name-tags</short-name>
  <uri>http://coreservlets.com/listeners</uri>

  <!-- Register the listener that sets up the 
       initial company name. -->
  <listener>
    <listener-class>
      coreservlets.listeners.InitialCompanyNameListener
    </listener-class>
  </listener>

  <!-- Register the listener that monitors changes to
       the company name.
  --> 
  <listener>
    <listener-class>
      coreservlets.listeners.ChangedCompanyNameListener
    </listener-class>
  </listener>
  
  <!-- Define a tag that prints out the current name. -->
  <tag>
    <description>The current company name</description>
    <name>companyName</name>
    <tag-class>coreservlets.tags.CompanyNameTag</tag-class>
    <body-content>empty</body-content>
  </tag>      
  
  <!-- Define a tag that prints out the previous name. -->
  <tag>
    <description>The previous company name</description>
    <name>formerCompanyName</name>
    <tag-class>coreservlets.tags.FormerCompanyNameTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
      <name>fullDescription</name>
      <required>false</required>
    </attribute>
  </tag> 
</taglib>
