POE::Component::IRC::Plugin::HTML::ElementInfo - lookup HTML element information from IRC


POE-Component-IRC-Plugin-HTML-ElementInfo documentation Contained in the POE-Component-IRC-Plugin-HTML-ElementInfo distribution.

Index


Code Index:

NAME

Top

POE::Component::IRC::Plugin::HTML::ElementInfo - lookup HTML element information from IRC

SYNOPSIS

Top

    use strict;
    use warnings;

    use POE qw(Component::IRC  Component::IRC::Plugin::HTML::ElementInfo);

    my $irc = POE::Component::IRC->spawn(
        nick        => 'HTMLInfoBot',
        server      => 'irc.freenode.net',
        port        => 6667,
        ircname     => 'Lookup HTML element info',
    );

    POE::Session->create(
        package_states => [
            main => [ qw(_start irc_001) ],
        ],
    );

    $poe_kernel->run;

    sub _start {
        $irc->yield( register => 'all' );

        $irc->plugin_add(
            'HTMLInfo' =>
                POE::Component::IRC::Plugin::HTML::ElementInfo->new
        );

        $irc->yield( connect => {} );
    }

    sub irc_001 {
        $_[KERNEL]->post( $_[SENDER] => join => '#zofbot' );
    }




    <Zoffix> HTMLInfoBot, html span
    <HTMLInfoBot> Zoffix, span [HTML 4.01] is not empty and not deprecated.
                  Start tag is required. End tag is required. Description:
                  generic language/style container.
    <Zoffix> HTMLInfoBot, html head
    <HTMLInfoBot> Zoffix, head [HTML 4.01] is not empty and not deprecated.
                  Start tag is optional. End tag is optional. Description:
                  document head.
    <Zoffix> HTMLInfoBot, html u
    <HTMLInfoBot> Zoffix, u [Loose HTML 4.01] is not empty and deprecated.
                  Start tag is required. End tag is required. Description:
                  underlined text style.
    <Zoffix> HTMLInfoBot, html blah
    <HTMLInfoBot> Zoffix, I don't have information for blah

DESCRIPTION

Top

This module is a POE::Component::IRC plugin which uses POE::Component::IRC::Plugin for its base. It provides interface to lookup HTML element information (description, whether or not the element is deprecated, are opening/closing tags required, etc)

It accepts input from public channel events, /notice messages as well as /msg (private messages); although that can be configured at will.

CONSTRUCTOR

Top

new

    # plain and simple
    $irc->plugin_add(
        'HTMLInfo' => POE::Component::IRC::Plugin::HTML::ElementInfo->new
    );

    # juicy flavor
    $irc->plugin_add(
        'HTMLInfo' =>
            POE::Component::IRC::Plugin::HTML::ElementInfo->new(
                auto             => 1,
                response_event   => 'irc_html_info',
                banned           => [ qr/aol\.com$/i ],
                root             => [ qr/mah.net$/i ],
                addressed        => 1,
                trigger          => qr/^html\s+(?=\S+$)/i,
                listen_for_input => [ qw(public notice privmsg) ],
                eat              => 1,
                debug            => 0,
                out_format       => '[[el]] [[[dtd]]] is [l[empty]] and '
                                    . '[l[deprecated]]. Start tag is [l[start_tag]].'
                                    . ' End tag is [l[end_tag]]. '
                                    . 'Description: [l[description]].',
            )
    );

The new() method constructs and returns a new POE::Component::IRC::Plugin::HTML::ElementInfo object suitable to be fed to POE::Component::IRC's plugin_add method. The constructor takes a few arguments, but all of them are optional. Note: you can change the values for constructor's arguments by accessing them as keys in plugin's object, i.e. $plugin_object->{one_of_arguments} = 'blah'

The possible arguments/values are as follows:

auto

    ->new( auto => 0 );

Optional. Takes either true or false values, specifies whether or not the plugin should auto respond to requests. When the auto argument is set to a true value plugin will respond to the requesting person with the results automatically. When the auto argument is set to a false value plugin will not respond and you will have to listen to the events emited by the plugin to retrieve the results (see EMITED EVENTS section and response_event argument for details). Defaults to: 1.

response_event

    ->new( response_event => 'event_name_to_recieve_results' );

Optional. Takes a scalar string specifying the name of the event to emit when the results of the request are ready. See EMITED EVENTS section for more information. Defaults to: irc_html_info

banned

    ->new( banned => [ qr/aol\.com$/i ] );

Optional. Takes an arrayref of regexes as a value. If the usermask of the person (or thing) making the request matches any of the regexes listed in the banned arrayref, plugin will ignore the request. Defaults to: [] (no bans are set).

root

    ->new( root => [ qr/\Qjust.me.and.my.friend.net\E$/i ] );

Optional. As opposed to banned argument, the root argument allows access only to people whose usermasks match any of the regexen you specify in the arrayref the argument takes as a value. By default: it is not specified. Note: as opposed to banned specifying an empty arrayref to root argument will restrict access to everyone.

trigger

    ->new( trigger => qr/^html\s+(?=\S+$)/i );

Optional. Takes a regex as an argument. Messages matching this regex will be considered as requests. See also addressed option below which is enabled by default. Note: the trigger will be removed from the message, therefore make sure your trigger doesn't match the actual data that needs to be processed. Defaults to: qr/^html\s+(?=\S+$)/i

addressed

    ->new( addressed => 1 );

Optional. Takes either true or false values. When set to a true value all the public messages must be addressed to the bot. In other words, if your bot's nickname is Nick and your trigger is qr/^trig\s+/ you would make the request by saying Nick, trig span. When addressed mode is turned on, the bot's nickname, including any whitespace and common punctuation character will be removed before matching the trigger (see above). When addressed argument it set to a false value, public messages will only have to match trigger regex in order to make a request. Note: this argument has no effect on /notice and /msg requests. Defaults to: 1

listen_for_input

    ->new( listen_for_input => [ qw(public  notice  privmsg) ] );

Optional. Takes an arrayref as a value which can contain any of the three elements, namely public, notice and privmsg which indicate which kind of input plugin should respond to. When the arrayref contains public element, plugin will respond to requests sent from messages in public channels (see addressed argument above for specifics). When the arrayref contains notice element plugin will respond to requests sent to it via /notice messages. When the arrayref contains privmsg element, the plugin will respond to requests sent to it via /msg (private messages). You can specify any of these. In other words, setting ( listen_for_input = [ qr(notice privmsg) ] )> will enable functionality only via /notice and /msg messages. Defaults to: [ qw(public notice privmsg) ]

out_format

    ->new( out_format =>
        '[[el]] [[[dtd]]] is [l[empty]] and '
        . '[l[deprecated]]. Start tag is [l[start_tag]]. End tag is '
        . '[l[end_tag]]. Description: [l[description]].'
    );

This monster argument specifies the format of the output message. As a value it takes a string with "tags". Those tags will be substituted by particular bits of information they represent. Tags in format [[tag_name]] will be replaced as they are and tags in format [l[tag_name]] (note the 'l') will be replaced by data in all lower case. In other words if data for tag 'empty' reads "Not empty" the [[empty]] tag will be replaced by words "Not empty" but [l[empty]] tags will be replaced by words "not empty". You can duplicate tags if you like. By default the out_format is set to:

        '[[el]] [[[dtd]]] is [l[empty]] and '
        . '[l[deprecated]]. Start tag is [l[start_tag]]. End tag is '
        . '[l[end_tag]]. Description: [l[description]].'

Which results in message as:

    <HTMLInfoBot> Zoffix, u [Loose HTML 4.01] is not empty and deprecated.
    Start tag is required. End tag is required. Description: underlined
    text style.

Possible tags are as follows:

[[el]]

Will be replaced by element's name, i.e. what the user gave the plugin to lookup information for.

[[dtd]]

Will be replaced with the DTD (Document Type Definition) in which the element is valid (this would usually be HTML 4.01 Strict, Loose and Frameset).

[[empty]]

Will be replaced with words "empty" or "not empty" depending on whether or not the element is an empty element

[[deprecated]]

Will be replaced with words "deprecated" or "not deprecated" indicating wether or not the element is deprecated in HTML 4.01 Strict.

[[start_tag]]

Will be replaced by words "required" or "optional" indicating wether or not the start tag for this element is required.

[[end_tag]]

Same as [[start_tag]] except this is for the end tag.

[[description]]

Will be replaced with element's short description (its purpose)

eat

    ->new( eat => 0 );

Optional. If set to a false value plugin will return a PCI_EAT_NONE after responding. If eat is set to a true value, plugin will return a PCI_EAT_ALL after responding. See POE::Component::IRC::Plugin documentation for more information if you are interested. Defaults to: 1

debug

    ->new( debug => 1 );

Optional. Takes either a true or false value. When debug argument is set to a true value some debugging information will be printed out. When debug argument is set to a false value no debug info will be printed. Defaults to: 0.

EMITED EVENTS

Top

response_event

    $VAR1 = {
        'out' => 'span [HTML 4.01] is not empty and not deprecated. Start
        tag is required. End tag is required. Description: generic
        language/style container.',
        'who' => 'Zoffix!n=Zoffix@unaffiliated/zoffix',
        'what' => 'span',
        'type' => 'public',
        'channel' => '#zofbot',
        'message' => 'HTMLInfoBot, html span'
    };

The event handler set up to handle the event, name of which you've specified in the response_event argument to the constructor (it defaults to irc_html_info) will recieve input every time request is completed. The input will come in $_[ARG0] in a form of a hashref. The keys/value of that hashref are as follows:

out

    { 'out' => 'span [HTML 4.01] is not empty and not deprecated. Start
            tag is required. End tag is required. Description: generic
            language/style container.' }

The out key will contain the "information message", this will be your out_format (see constructor) string filled with bits of information and this will be what will be sent to IRC if auto argument to constructor is set to a true value.

what

    { 'what' => 'span' }

The what key will contain the name of the element which was looked up.

who

    { 'who' => 'Zoffix!n=Zoffix@unaffiliated/zoffix' }

The who key will contain the usermask of the user who sent the request.

type

    { 'type' => 'public' }

The type key will contain the "type" of the message sent by the requestor. The possible values are: public, notice and privmsg indicating that request was requested in public channel, via /notice and via /msg (private message) respectively.

channel

    { 'channel' => '#zofbot' }

The channel key will contain the name of the channel from which the request came from. This will only make sense when type key (see above) contains public.

message

    { 'message' => 'HTMLInfoBot, html span' }

The message key will contain the message which the user has sent to request.

AUTHOR

Top

Zoffix Znet, <zoffix at cpan.org> (http://zoffix.com, http://haslayout.net)

BUGS

Top

Please report any bugs or feature requests to bug-poe-component-irc-plugin-html-elementinfo at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-IRC-Plugin-HTML-ElementInfo. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc POE::Component::IRC::Plugin::HTML::ElementInfo

You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-IRC-Plugin-HTML-ElementInfo

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/POE-Component-IRC-Plugin-HTML-ElementInfo

* CPAN Ratings

http://cpanratings.perl.org/d/POE-Component-IRC-Plugin-HTML-ElementInfo

* Search CPAN

http://search.cpan.org/dist/POE-Component-IRC-Plugin-HTML-ElementInfo

COPYRIGHT & LICENSE

Top


POE-Component-IRC-Plugin-HTML-ElementInfo documentation Contained in the POE-Component-IRC-Plugin-HTML-ElementInfo distribution.

package POE::Component::IRC::Plugin::HTML::ElementInfo;

use warnings;
use strict;

our $VERSION = '0.001';

use base 'POE::Component::IRC::Plugin::BaseWrap';

my %Data = _make_load_data();

sub _make_default_args {
    return (
        trigger          => qr/^html\s+(?=\S+$)/i,
        response_event   => 'irc_html_info',
        out_format       => '[[el]] [[[dtd]]] is [l[empty]] and '
                           . '[l[deprecated]]. Start tag is [l[start_tag]].'
                           . ' End tag is [l[end_tag]]. '
                           . 'Description: [l[description]].',
    );
}

sub _make_response_message {
    my ( $self, $in_ref ) = @_;
    my $nick = (split /!/, $in_ref->{who})[0];
    return [ "$nick, " . $self->_make_data( $in_ref->{what} ) ];
}

sub _make_response_event {
    my ( $self, $in_ref ) = @_;
    $in_ref->{out} = $self->_make_data( $in_ref->{what} );
    return $in_ref;
}

sub _make_data {
    my ( $self, $element ) = @_;

    $element =~ s/^\s+|\s+$//g;
    $element = lc $element;

    unless ( exists $Data{ $element } ) {
         # some punks love to give bots garbage trying to drop them..
         # .. cut the junk off
        $element = substr $element, 0, 25;
        return "I don't have information for $element";
    }

    my $data_ref = $Data{ $element };
    $data_ref->{description} = ucfirst $data_ref->{description};
    my $out = $self->{out_format};
    for ( keys %$data_ref ) {
        $out =~ s/\Q[[$_]]/$data_ref->{$_}/g;
        $out =~ s/\Q[l[$_]]/\L$data_ref->{$_}/ig;
    }
    $out =~ s/\Q[[el]]/$element/g;
    $out =~ s/\Q[l[el]]/\L$element/ig;

    return $out;
}

sub _make_load_data {
    return (
        'a' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#anchor#,
        },
        'abbr' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#abbreviated form (e.g., WWW, HTTP, etc.)#,
        },
        'acronym' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#Indicates an acronym (e.g., WAC, radar, etc.)#,
        },
        'address' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#information on author#,
        },
        'applet' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#Java applet#,
        },
        'area' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#client-side image map area#,
        },
        'b' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#bold text style#,
        },
        'base' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#document base URI#,
        },
        'basefont' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#base font size#,
        },
        'bdo' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#I18N BiDi over-ride#,
        },
        'big' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#large text style#,
        },
        'blockquote' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#long quotation#,
        },
        'body' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Optional#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#document body#,
        },
        'br' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#forced line break#,
        },
        'button' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#push button#,
        },
        'caption' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#table caption#,
        },
        'center' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#shorthand for DIV align=center#,
        },
        'cite' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#citation#,
        },
        'code' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#computer code fragment#,
        },
        'col' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#table column#,
        },
        'colgroup' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table column group#,
        },
        'dd' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#definition description#,
        },
        'del' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#deleted text#,
        },
        'dfn' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#instance definition#,
        },
        'dir' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#directory list#,
        },
        'div' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#generic language/style container#,
        },
        'dl' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#definition list#,
        },
        'dt' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#definition term#,
        },
        'em' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#emphasis#,
        },
        'fieldset' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#form control group#,
        },
        'font' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#local change to font#,
        },
        'form' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#interactive form#,
        },
        'frame' => {
            'dtd' => q#Frameset HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#subwindow#,
        },
        'frameset' => {
            'dtd' => q#Frameset HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#window subdivision#,
        },
        'h1' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#heading#,
        },
        'h2' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#heading#,
        },
        'h3' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#heading#,
        },
        'h4' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#heading#,
        },
        'h5' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#heading#,
        },
        'h6' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#heading#,
        },
        'head' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Optional#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#document head#,
        },
        'hr' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#horizontal rule#,
        },
        'html' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Optional#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#document root element#,
        },
        'i' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#italic text style#,
        },
        'iframe' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#inline subwindow#,
        },
        'img' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#Embedded image#,
        },
        'input' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#form control#,
        },
        'ins' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#inserted text#,
        },
        'isindex' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#single line prompt#,
        },
        'kbd' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#text to be entered by the user#,
        },
        'label' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#form field label text#,
        },
        'legend' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#fieldset legend#,
        },
        'li' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#list item#,
        },
        'link' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#a media-independent link#,
        },
        'map' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#client-side image map#,
        },
        'menu' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#menu list#,
        },
        'meta' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#generic metainformation#,
        },
        'noframes' => {
            'dtd' => q#Frameset HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#alternate content container for non frame-based rendering#,
        },
        'noscript' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#alternate content container for non script-based rendering#,
        },
        'object' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#generic embedded object#,
        },
        'ol' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#ordered list#,
        },
        'optgroup' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#option group#,
        },
        'option' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#selectable choice#,
        },
        'p' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#paragraph#,
        },
        'param' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Empty#,
            'end_tag' => q#Forbidden#,
            'description' => q#named property value#,
        },
        'pre' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#preformatted text#,
        },
        'q' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#short inline quotation#,
        },
        's' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#strike-through text style#,
        },
        'samp' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#sample program output, scripts, etc.#,
        },
        'script' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#script statements#,
        },
        'select' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#option selector#,
        },
        'small' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#small text style#,
        },
        'span' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#generic language/style container#,
        },
        'strike' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#strike-through text#,
        },
        'strong' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#strong emphasis#,
        },
        'style' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#style info#,
        },
        'sub' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#subscript#,
        },
        'sup' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#superscript#,
        },
        'table' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#The TABLE element contains all other elements that specify caption, rows, content, and formatting.#,
        },
        'tbody' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Optional#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table body#,
        },
        'td' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table data cell#,
        },
        'textarea' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#multi-line text field#,
        },
        'tfoot' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table footer#,
        },
        'th' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table header cell#,
        },
        'thead' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table header#,
        },
        'title' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#document title#,
        },
        'tr' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Optional#,
            'description' => q#table row#,
        },
        'tt' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#teletype or monospaced text style#,
        },
        'u' => {
            'dtd' => q#Loose HTML 4.01#,
            'deprecated' => q#Deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#underlined text style#,
        },
        'ul' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#unordered list#,
        },
        'var' => {
            'dtd' => q#HTML 4.01#,
            'deprecated' => q#Not deprecated#,
            'start_tag' => q#Required#,
            'empty' => q#Not empty#,
            'end_tag' => q#Required#,
            'description' => q#instance of a variable or program argument#,
        },
    );
}

1;
__END__