#line 1
package XML::SAX::Base;

# version 0.10 - Kip Hampton <khampton@totalcinema.com>
# version 0.13 - Robin Berjon <robin@knowscape.com>
# version 0.15 - Kip Hampton <khampton@totalcinema.com>
# version 0.17 - Kip Hampton <khampton@totalcinema.com>
# version 0.19 - Kip Hampton <khampton@totalcinema.com>
# version 0.21 - Kip Hampton <khampton@totalcinema.com>
# version 0.22 - Robin Berjon <robin@knowscape.com>
# version 0.23 - Matt Sergeant <matt@sergeant.org>
# version 0.24 - Robin Berjon <robin@knowscape.com>
# version 0.25 - Kip Hampton <khampton@totalcinema.com>
# version 1.00 - Kip Hampton <khampton@totalcinema.com>
# version 1.01 - Kip Hampton <khampton@totalcinema.com>
# version 1.02 - Robin Berjon <robin@knowscape.com>

#-----------------------------------------------------#
# STOP!!!!!
#
# This file is generated by the 'Makefile.PL' file
# that ships with the XML::SAX distribution.
# If you need to make changes, patch that file NOT
# this one.
#-----------------------------------------------------#

use strict;
use vars qw($VERSION);
use XML::SAX::Exception qw();
$VERSION = '1.02';

sub end_prefix_mapping {
    my $self = shift;
    if (defined $self->{Methods}->{'end_prefix_mapping'}) {
        $self->{Methods}->{'end_prefix_mapping'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('end_prefix_mapping') ) {
            $self->{Methods}->{'end_prefix_mapping'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_prefix_mapping') ) {
            $self->{Methods}->{'end_prefix_mapping'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->end_prefix_mapping(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_prefix_mapping'} = sub { $callbacks->{'ContentHandler'}->end_prefix_mapping(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->end_prefix_mapping(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_prefix_mapping'} = sub { $callbacks->{'Handler'}->end_prefix_mapping(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'end_prefix_mapping'} = sub { $self->no_op };
        }
    }

}

sub internal_entity_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'internal_entity_decl'}) {
        $self->{Methods}->{'internal_entity_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('internal_entity_decl') ) {
            $self->{Methods}->{'internal_entity_decl'} = sub { $method->($callbacks->{'DeclHandler'}, @_) };
            $method->($callbacks->{DeclHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('internal_entity_decl') ) {
            $self->{Methods}->{'internal_entity_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DeclHandler'} and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DeclHandler'}->internal_entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'internal_entity_decl'} = sub { $callbacks->{'DeclHandler'}->internal_entity_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->internal_entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'internal_entity_decl'} = sub { $callbacks->{'Handler'}->internal_entity_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'internal_entity_decl'} = sub { $self->no_op };
        }
    }

}

sub characters {
    my $self = shift;
    if (defined $self->{Methods}->{'characters'}) {
        $self->{Methods}->{'characters'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('characters') ) {
            $self->{Methods}->{'characters'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('characters') ) {
            $self->{Methods}->{'characters'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('characters') ) {
            $self->{Methods}->{'characters'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->characters(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'characters'} = sub { $callbacks->{'ContentHandler'}->characters(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->characters(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'characters'} = sub { $callbacks->{'DocumentHandler'}->characters(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->characters(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'characters'} = sub { $callbacks->{'Handler'}->characters(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'characters'} = sub { $self->no_op };
        }
    }

}

sub start_element {
    my $self = shift;
    if (defined $self->{Methods}->{'start_element'}) {
        $self->{Methods}->{'start_element'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('start_element') ) {
            $self->{Methods}->{'start_element'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('start_element') ) {
            $self->{Methods}->{'start_element'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_element') ) {
            $self->{Methods}->{'start_element'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->start_element(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_element'} = sub { $callbacks->{'ContentHandler'}->start_element(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->start_element(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_element'} = sub { $callbacks->{'DocumentHandler'}->start_element(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->start_element(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_element'} = sub { $callbacks->{'Handler'}->start_element(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'start_element'} = sub { $self->no_op };
        }
    }

}

sub external_entity_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'external_entity_decl'}) {
        $self->{Methods}->{'external_entity_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('external_entity_decl') ) {
            $self->{Methods}->{'external_entity_decl'} = sub { $method->($callbacks->{'DeclHandler'}, @_) };
            $method->($callbacks->{DeclHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('external_entity_decl') ) {
            $self->{Methods}->{'external_entity_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DeclHandler'} and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DeclHandler'}->external_entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'external_entity_decl'} = sub { $callbacks->{'DeclHandler'}->external_entity_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->external_entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'external_entity_decl'} = sub { $callbacks->{'Handler'}->external_entity_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'external_entity_decl'} = sub { $self->no_op };
        }
    }

}

sub xml_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'xml_decl'}) {
        $self->{Methods}->{'xml_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('xml_decl') ) {
            $self->{Methods}->{'xml_decl'} = sub { $method->($callbacks->{'DTDHandler'}, @_) };
            $method->($callbacks->{DTDHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('xml_decl') ) {
            $self->{Methods}->{'xml_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DTDHandler'} and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DTDHandler'}->xml_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'xml_decl'} = sub { $callbacks->{'DTDHandler'}->xml_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->xml_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'xml_decl'} = sub { $callbacks->{'Handler'}->xml_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'xml_decl'} = sub { $self->no_op };
        }
    }

}

sub entity_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'entity_decl'}) {
        $self->{Methods}->{'entity_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('entity_decl') ) {
            $self->{Methods}->{'entity_decl'} = sub { $method->($callbacks->{'DTDHandler'}, @_) };
            $method->($callbacks->{DTDHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('entity_decl') ) {
            $self->{Methods}->{'entity_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DTDHandler'} and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DTDHandler'}->entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'entity_decl'} = sub { $callbacks->{'DTDHandler'}->entity_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'entity_decl'} = sub { $callbacks->{'Handler'}->entity_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'entity_decl'} = sub { $self->no_op };
        }
    }

}

sub end_dtd {
    my $self = shift;
    if (defined $self->{Methods}->{'end_dtd'}) {
        $self->{Methods}->{'end_dtd'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('end_dtd') ) {
            $self->{Methods}->{'end_dtd'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_dtd') ) {
            $self->{Methods}->{'end_dtd'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->end_dtd(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_dtd'} = sub { $callbacks->{'LexicalHandler'}->end_dtd(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->end_dtd(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_dtd'} = sub { $callbacks->{'Handler'}->end_dtd(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'end_dtd'} = sub { $self->no_op };
        }
    }

}

sub unparsed_entity_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'unparsed_entity_decl'}) {
        $self->{Methods}->{'unparsed_entity_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('unparsed_entity_decl') ) {
            $self->{Methods}->{'unparsed_entity_decl'} = sub { $method->($callbacks->{'DTDHandler'}, @_) };
            $method->($callbacks->{DTDHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('unparsed_entity_decl') ) {
            $self->{Methods}->{'unparsed_entity_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DTDHandler'} and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DTDHandler'}->unparsed_entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'unparsed_entity_decl'} = sub { $callbacks->{'DTDHandler'}->unparsed_entity_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->unparsed_entity_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'unparsed_entity_decl'} = sub { $callbacks->{'Handler'}->unparsed_entity_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'unparsed_entity_decl'} = sub { $self->no_op };
        }
    }

}

sub processing_instruction {
    my $self = shift;
    if (defined $self->{Methods}->{'processing_instruction'}) {
        $self->{Methods}->{'processing_instruction'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('processing_instruction') ) {
            $self->{Methods}->{'processing_instruction'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('processing_instruction') ) {
            $self->{Methods}->{'processing_instruction'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('processing_instruction') ) {
            $self->{Methods}->{'processing_instruction'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->processing_instruction(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'processing_instruction'} = sub { $callbacks->{'ContentHandler'}->processing_instruction(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->processing_instruction(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'processing_instruction'} = sub { $callbacks->{'DocumentHandler'}->processing_instruction(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->processing_instruction(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'processing_instruction'} = sub { $callbacks->{'Handler'}->processing_instruction(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'processing_instruction'} = sub { $self->no_op };
        }
    }

}

sub attribute_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'attribute_decl'}) {
        $self->{Methods}->{'attribute_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('attribute_decl') ) {
            $self->{Methods}->{'attribute_decl'} = sub { $method->($callbacks->{'DeclHandler'}, @_) };
            $method->($callbacks->{DeclHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('attribute_decl') ) {
            $self->{Methods}->{'attribute_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DeclHandler'} and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DeclHandler'}->attribute_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'attribute_decl'} = sub { $callbacks->{'DeclHandler'}->attribute_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->attribute_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'attribute_decl'} = sub { $callbacks->{'Handler'}->attribute_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'attribute_decl'} = sub { $self->no_op };
        }
    }

}

sub fatal_error {
    my $self = shift;
    if (defined $self->{Methods}->{'fatal_error'}) {
        $self->{Methods}->{'fatal_error'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ErrorHandler'} and $method = $callbacks->{'ErrorHandler'}->can('fatal_error') ) {
            $self->{Methods}->{'fatal_error'} = sub { $method->($callbacks->{'ErrorHandler'}, @_) };
            $method->($callbacks->{ErrorHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('fatal_error') ) {
            $self->{Methods}->{'fatal_error'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ErrorHandler'} and $callbacks->{'ErrorHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ErrorHandler'}->fatal_error(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'fatal_error'} = sub { $callbacks->{'ErrorHandler'}->fatal_error(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->fatal_error(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'fatal_error'} = sub { $callbacks->{'Handler'}->fatal_error(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'fatal_error'} = sub { $self->no_op };
        }
    }

}

sub end_cdata {
    my $self = shift;
    if (defined $self->{Methods}->{'end_cdata'}) {
        $self->{Methods}->{'end_cdata'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('end_cdata') ) {
            $self->{Methods}->{'end_cdata'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('end_cdata') ) {
            $self->{Methods}->{'end_cdata'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_cdata') ) {
            $self->{Methods}->{'end_cdata'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->end_cdata(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_cdata'} = sub { $callbacks->{'DocumentHandler'}->end_cdata(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->end_cdata(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_cdata'} = sub { $callbacks->{'LexicalHandler'}->end_cdata(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->end_cdata(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_cdata'} = sub { $callbacks->{'Handler'}->end_cdata(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'end_cdata'} = sub { $self->no_op };
        }
    }

}

sub start_entity {
    my $self = shift;
    if (defined $self->{Methods}->{'start_entity'}) {
        $self->{Methods}->{'start_entity'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('start_entity') ) {
            $self->{Methods}->{'start_entity'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_entity') ) {
            $self->{Methods}->{'start_entity'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->start_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_entity'} = sub { $callbacks->{'LexicalHandler'}->start_entity(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->start_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_entity'} = sub { $callbacks->{'Handler'}->start_entity(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'start_entity'} = sub { $self->no_op };
        }
    }

}

sub start_prefix_mapping {
    my $self = shift;
    if (defined $self->{Methods}->{'start_prefix_mapping'}) {
        $self->{Methods}->{'start_prefix_mapping'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('start_prefix_mapping') ) {
            $self->{Methods}->{'start_prefix_mapping'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_prefix_mapping') ) {
            $self->{Methods}->{'start_prefix_mapping'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->start_prefix_mapping(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_prefix_mapping'} = sub { $callbacks->{'ContentHandler'}->start_prefix_mapping(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->start_prefix_mapping(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_prefix_mapping'} = sub { $callbacks->{'Handler'}->start_prefix_mapping(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'start_prefix_mapping'} = sub { $self->no_op };
        }
    }

}

sub error {
    my $self = shift;
    if (defined $self->{Methods}->{'error'}) {
        $self->{Methods}->{'error'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ErrorHandler'} and $method = $callbacks->{'ErrorHandler'}->can('error') ) {
            $self->{Methods}->{'error'} = sub { $method->($callbacks->{'ErrorHandler'}, @_) };
            $method->($callbacks->{ErrorHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('error') ) {
            $self->{Methods}->{'error'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ErrorHandler'} and $callbacks->{'ErrorHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ErrorHandler'}->error(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'error'} = sub { $callbacks->{'ErrorHandler'}->error(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->error(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'error'} = sub { $callbacks->{'Handler'}->error(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'error'} = sub { $self->no_op };
        }
    }

}

sub start_document {
    my $self = shift;
    if (defined $self->{Methods}->{'start_document'}) {
        $self->{Methods}->{'start_document'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('start_document') ) {
            $self->{Methods}->{'start_document'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('start_document') ) {
            $self->{Methods}->{'start_document'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_document') ) {
            $self->{Methods}->{'start_document'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->start_document(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_document'} = sub { $callbacks->{'ContentHandler'}->start_document(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->start_document(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_document'} = sub { $callbacks->{'DocumentHandler'}->start_document(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->start_document(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_document'} = sub { $callbacks->{'Handler'}->start_document(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'start_document'} = sub { $self->no_op };
        }
    }

}

sub ignorable_whitespace {
    my $self = shift;
    if (defined $self->{Methods}->{'ignorable_whitespace'}) {
        $self->{Methods}->{'ignorable_whitespace'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('ignorable_whitespace') ) {
            $self->{Methods}->{'ignorable_whitespace'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('ignorable_whitespace') ) {
            $self->{Methods}->{'ignorable_whitespace'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('ignorable_whitespace') ) {
            $self->{Methods}->{'ignorable_whitespace'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->ignorable_whitespace(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'ignorable_whitespace'} = sub { $callbacks->{'ContentHandler'}->ignorable_whitespace(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->ignorable_whitespace(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'ignorable_whitespace'} = sub { $callbacks->{'DocumentHandler'}->ignorable_whitespace(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->ignorable_whitespace(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'ignorable_whitespace'} = sub { $callbacks->{'Handler'}->ignorable_whitespace(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'ignorable_whitespace'} = sub { $self->no_op };
        }
    }

}

sub end_document {
    my $self = shift;
    if (defined $self->{Methods}->{'end_document'}) {
        $self->{Methods}->{'end_document'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('end_document') ) {
            $self->{Methods}->{'end_document'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('end_document') ) {
            $self->{Methods}->{'end_document'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_document') ) {
            $self->{Methods}->{'end_document'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->end_document(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_document'} = sub { $callbacks->{'ContentHandler'}->end_document(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->end_document(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_document'} = sub { $callbacks->{'DocumentHandler'}->end_document(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->end_document(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_document'} = sub { $callbacks->{'Handler'}->end_document(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'end_document'} = sub { $self->no_op };
        }
    }

}

sub start_cdata {
    my $self = shift;
    if (defined $self->{Methods}->{'start_cdata'}) {
        $self->{Methods}->{'start_cdata'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('start_cdata') ) {
            $self->{Methods}->{'start_cdata'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('start_cdata') ) {
            $self->{Methods}->{'start_cdata'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_cdata') ) {
            $self->{Methods}->{'start_cdata'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->start_cdata(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_cdata'} = sub { $callbacks->{'DocumentHandler'}->start_cdata(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->start_cdata(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_cdata'} = sub { $callbacks->{'LexicalHandler'}->start_cdata(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->start_cdata(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_cdata'} = sub { $callbacks->{'Handler'}->start_cdata(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'start_cdata'} = sub { $self->no_op };
        }
    }

}

sub set_document_locator {
    my $self = shift;
    if (defined $self->{Methods}->{'set_document_locator'}) {
        $self->{Methods}->{'set_document_locator'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('set_document_locator') ) {
            $self->{Methods}->{'set_document_locator'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('set_document_locator') ) {
            $self->{Methods}->{'set_document_locator'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('set_document_locator') ) {
            $self->{Methods}->{'set_document_locator'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->set_document_locator(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'set_document_locator'} = sub { $callbacks->{'ContentHandler'}->set_document_locator(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->set_document_locator(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'set_document_locator'} = sub { $callbacks->{'DocumentHandler'}->set_document_locator(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->set_document_locator(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'set_document_locator'} = sub { $callbacks->{'Handler'}->set_document_locator(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'set_document_locator'} = sub { $self->no_op };
        }
    }

}

sub attlist_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'attlist_decl'}) {
        $self->{Methods}->{'attlist_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('attlist_decl') ) {
            $self->{Methods}->{'attlist_decl'} = sub { $method->($callbacks->{'DTDHandler'}, @_) };
            $method->($callbacks->{DTDHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('attlist_decl') ) {
            $self->{Methods}->{'attlist_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DTDHandler'} and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DTDHandler'}->attlist_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'attlist_decl'} = sub { $callbacks->{'DTDHandler'}->attlist_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->attlist_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'attlist_decl'} = sub { $callbacks->{'Handler'}->attlist_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'attlist_decl'} = sub { $self->no_op };
        }
    }

}

sub start_dtd {
    my $self = shift;
    if (defined $self->{Methods}->{'start_dtd'}) {
        $self->{Methods}->{'start_dtd'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('start_dtd') ) {
            $self->{Methods}->{'start_dtd'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_dtd') ) {
            $self->{Methods}->{'start_dtd'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->start_dtd(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_dtd'} = sub { $callbacks->{'LexicalHandler'}->start_dtd(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->start_dtd(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'start_dtd'} = sub { $callbacks->{'Handler'}->start_dtd(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'start_dtd'} = sub { $self->no_op };
        }
    }

}

sub resolve_entity {
    my $self = shift;
    if (defined $self->{Methods}->{'resolve_entity'}) {
        $self->{Methods}->{'resolve_entity'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'EntityResolver'} and $method = $callbacks->{'EntityResolver'}->can('resolve_entity') ) {
            $self->{Methods}->{'resolve_entity'} = sub { $method->($callbacks->{'EntityResolver'}, @_) };
            $method->($callbacks->{EntityResolver}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('resolve_entity') ) {
            $self->{Methods}->{'resolve_entity'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'EntityResolver'} and $callbacks->{'EntityResolver'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'EntityResolver'}->resolve_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'resolve_entity'} = sub { $callbacks->{'EntityResolver'}->resolve_entity(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->resolve_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'resolve_entity'} = sub { $callbacks->{'Handler'}->resolve_entity(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'resolve_entity'} = sub { $self->no_op };
        }
    }

}

sub entity_reference {
    my $self = shift;
    if (defined $self->{Methods}->{'entity_reference'}) {
        $self->{Methods}->{'entity_reference'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('entity_reference') ) {
            $self->{Methods}->{'entity_reference'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('entity_reference') ) {
            $self->{Methods}->{'entity_reference'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->entity_reference(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'entity_reference'} = sub { $callbacks->{'DocumentHandler'}->entity_reference(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->entity_reference(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'entity_reference'} = sub { $callbacks->{'Handler'}->entity_reference(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'entity_reference'} = sub { $self->no_op };
        }
    }

}

sub element_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'element_decl'}) {
        $self->{Methods}->{'element_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('element_decl') ) {
            $self->{Methods}->{'element_decl'} = sub { $method->($callbacks->{'DeclHandler'}, @_) };
            $method->($callbacks->{DeclHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('element_decl') ) {
            $self->{Methods}->{'element_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DeclHandler'} and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DeclHandler'}->element_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'element_decl'} = sub { $callbacks->{'DeclHandler'}->element_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->element_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'element_decl'} = sub { $callbacks->{'Handler'}->element_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'element_decl'} = sub { $self->no_op };
        }
    }

}

sub notation_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'notation_decl'}) {
        $self->{Methods}->{'notation_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('notation_decl') ) {
            $self->{Methods}->{'notation_decl'} = sub { $method->($callbacks->{'DTDHandler'}, @_) };
            $method->($callbacks->{DTDHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('notation_decl') ) {
            $self->{Methods}->{'notation_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DTDHandler'} and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DTDHandler'}->notation_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'notation_decl'} = sub { $callbacks->{'DTDHandler'}->notation_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->notation_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'notation_decl'} = sub { $callbacks->{'Handler'}->notation_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'notation_decl'} = sub { $self->no_op };
        }
    }

}

sub skipped_entity {
    my $self = shift;
    if (defined $self->{Methods}->{'skipped_entity'}) {
        $self->{Methods}->{'skipped_entity'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('skipped_entity') ) {
            $self->{Methods}->{'skipped_entity'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('skipped_entity') ) {
            $self->{Methods}->{'skipped_entity'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->skipped_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'skipped_entity'} = sub { $callbacks->{'ContentHandler'}->skipped_entity(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->skipped_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'skipped_entity'} = sub { $callbacks->{'Handler'}->skipped_entity(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'skipped_entity'} = sub { $self->no_op };
        }
    }

}

sub end_element {
    my $self = shift;
    if (defined $self->{Methods}->{'end_element'}) {
        $self->{Methods}->{'end_element'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('end_element') ) {
            $self->{Methods}->{'end_element'} = sub { $method->($callbacks->{'ContentHandler'}, @_) };
            $method->($callbacks->{ContentHandler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('end_element') ) {
            $self->{Methods}->{'end_element'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_element') ) {
            $self->{Methods}->{'end_element'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ContentHandler'} and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ContentHandler'}->end_element(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_element'} = sub { $callbacks->{'ContentHandler'}->end_element(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->end_element(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_element'} = sub { $callbacks->{'DocumentHandler'}->end_element(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->end_element(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_element'} = sub { $callbacks->{'Handler'}->end_element(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'end_element'} = sub { $self->no_op };
        }
    }

}

sub doctype_decl {
    my $self = shift;
    if (defined $self->{Methods}->{'doctype_decl'}) {
        $self->{Methods}->{'doctype_decl'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('doctype_decl') ) {
            $self->{Methods}->{'doctype_decl'} = sub { $method->($callbacks->{'DTDHandler'}, @_) };
            $method->($callbacks->{DTDHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('doctype_decl') ) {
            $self->{Methods}->{'doctype_decl'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DTDHandler'} and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DTDHandler'}->doctype_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'doctype_decl'} = sub { $callbacks->{'DTDHandler'}->doctype_decl(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->doctype_decl(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'doctype_decl'} = sub { $callbacks->{'Handler'}->doctype_decl(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'doctype_decl'} = sub { $self->no_op };
        }
    }

}

sub comment {
    my $self = shift;
    if (defined $self->{Methods}->{'comment'}) {
        $self->{Methods}->{'comment'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('comment') ) {
            $self->{Methods}->{'comment'} = sub { $method->($callbacks->{'DocumentHandler'}, @_) };
            $method->($callbacks->{DocumentHandler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('comment') ) {
            $self->{Methods}->{'comment'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('comment') ) {
            $self->{Methods}->{'comment'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'DocumentHandler'} and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'DocumentHandler'}->comment(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'comment'} = sub { $callbacks->{'DocumentHandler'}->comment(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->comment(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'comment'} = sub { $callbacks->{'LexicalHandler'}->comment(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->comment(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'comment'} = sub { $callbacks->{'Handler'}->comment(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'comment'} = sub { $self->no_op };
        }
    }

}

sub end_entity {
    my $self = shift;
    if (defined $self->{Methods}->{'end_entity'}) {
        $self->{Methods}->{'end_entity'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('end_entity') ) {
            $self->{Methods}->{'end_entity'} = sub { $method->($callbacks->{'LexicalHandler'}, @_) };
            $method->($callbacks->{LexicalHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_entity') ) {
            $self->{Methods}->{'end_entity'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'LexicalHandler'} and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'LexicalHandler'}->end_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_entity'} = sub { $callbacks->{'LexicalHandler'}->end_entity(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->end_entity(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'end_entity'} = sub { $callbacks->{'Handler'}->end_entity(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'end_entity'} = sub { $self->no_op };
        }
    }

}

sub warning {
    my $self = shift;
    if (defined $self->{Methods}->{'warning'}) {
        $self->{Methods}->{'warning'}->(@_);
    }
    else {
        my $method;
        my $callbacks;
        if (exists $self->{ParseOptions}) {
            $callbacks = $self->{ParseOptions};
        }
        else {
            $callbacks = $self;
        }
        if (0) { # dummy to make elsif's below compile
        }
        elsif (defined $callbacks->{'ErrorHandler'} and $method = $callbacks->{'ErrorHandler'}->can('warning') ) {
            $self->{Methods}->{'warning'} = sub { $method->($callbacks->{'ErrorHandler'}, @_) };
            $method->($callbacks->{ErrorHandler}, @_);
        }
        elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('warning') ) {
            $self->{Methods}->{'warning'} = sub { $method->($callbacks->{'Handler'}, @_) };
            $method->($callbacks->{Handler}, @_);
        }
        elsif (defined $callbacks->{'ErrorHandler'} and $callbacks->{'ErrorHandler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'ErrorHandler'}->warning(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'warning'} = sub { $callbacks->{'ErrorHandler'}->warning(@_) };
            }
            return $res;
        }
        elsif (defined $callbacks->{'Handler'} and $callbacks->{'Handler'}->can('AUTOLOAD') ) {
            my $res = eval { $callbacks->{'Handler'}->warning(@_) };
            if ($@) {
                die $@;
            }
            else {
                # I think there's a buggette here...
                # if the first call throws an exception, we don't set it up right.
                # Not fatal, but we might want to address it.
                $self->{Methods}->{'warning'} = sub { $callbacks->{'Handler'}->warning(@_) };
            }
            return $res;
        }
        else {
            $self->{Methods}->{'warning'} = sub { $self->no_op };
        }
    }

}

#-------------------------------------------------------------------#
# Class->new(%options)
#-------------------------------------------------------------------#
sub new {
    my $proto = shift;
    my $class = ref($proto) || $proto;
    my $options = ($#_ == 0) ? shift : { @_ };

    $options->{Handler} ||= XML::SAX::Base::NoHandler->new;
    return bless $options, $class;
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# $p->parse(%options)
#-------------------------------------------------------------------#
sub parse {
    my $self = shift;
    my $parse_options = $self->get_options(@_);
    local $self->{ParseOptions} = $parse_options;
    if ($self->{Parent}) { # calling parse on a filter for some reason
        return $self->{Parent}->parse($parse_options);
    }
    else {
        my $method;
        if (defined $parse_options->{Source}{CharacterStream} and $method = $self->can('_parse_characterstream')) {
            warn("parse charstream???\n");
            return $method->($self, $parse_options->{Source}{CharacterStream});
        }
        elsif (defined $parse_options->{Source}{ByteStream} and $method = $self->can('_parse_bytestream')) {
            return $method->($self, $parse_options->{Source}{ByteStream});
        }
        elsif (defined $parse_options->{Source}{String} and $method = $self->can('_parse_string')) {
            return $method->($self, $parse_options->{Source}{String});
        }
        elsif (defined $parse_options->{Source}{SystemId} and $method = $self->can('_parse_systemid')) {
            return $method->($self, $parse_options->{Source}{SystemId});
        }
        else {
            die "No _parse_* routine defined on this driver (if it a filter, remember to set the Parent property) [$self]";
        }
    }
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# $p->parse_file(%options)
#-------------------------------------------------------------------#
sub parse_file {
    my $self = shift;
    my $file = shift;
    my $parse_options = $self->get_options(@_);
    $parse_options->{Source}{ByteStream} = $file;
    return $self->parse($parse_options);
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# $p->parse_uri(%options)
#-------------------------------------------------------------------#
sub parse_uri {
    my $self = shift;
    my $file = shift;
    my $parse_options = $self->get_options(@_);
    $parse_options->{Source}{SystemId} = $file;
    return $self->parse($parse_options);
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# $p->parse_string(%options)
#-------------------------------------------------------------------#
sub parse_string {
    my $self = shift;
    my $string = shift;
    my $parse_options = $self->get_options(@_);
    $parse_options->{Source}{String} = $string;
    return $self->parse($parse_options);
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# get_options
#-------------------------------------------------------------------#
sub get_options {
    my $self = shift;

    if (@_ == 1) {
        return { %$self, %{$_[0]} };
    } else {
        return { %$self, @_ };
    }
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# get_features
#-------------------------------------------------------------------#
sub get_features {
   return (
    'http://xml.org/sax/features/external-general-entities'     => undef,
    'http://xml.org/sax/features/external-parameter-entities'   => undef,
    'http://xml.org/sax/features/is-standalone'                 => undef,
    'http://xml.org/sax/features/lexical-handler'               => undef,
    'http://xml.org/sax/features/parameter-entities'            => undef,
    'http://xml.org/sax/features/namespaces'                    => 1,
    'http://xml.org/sax/features/namespace-prefixes'            => 0,
    'http://xml.org/sax/features/string-interning'              => undef,
    'http://xml.org/sax/features/use-attributes2'               => undef,
    'http://xml.org/sax/features/use-locator2'                  => undef,
    'http://xml.org/sax/features/validation'                    => undef,

    'http://xml.org/sax/properties/dom-node'                    => undef,
    'http://xml.org/sax/properties/xml-string'                  => undef,
               );
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# get_feature
#-------------------------------------------------------------------#
sub get_feature {
    my $self = shift;
    my $feat = shift;
    # check %FEATURES to see if it's there, and return it if so
    # throw XML::SAX::Exception::NotRecognized if it's not there
    # throw XML::SAX::Exception::NotSupported if it's there but we
    # don't support it
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# set_feature
#-------------------------------------------------------------------#
sub set_feature {
    my $self = shift;
    my $feat = shift;
    my $value = shift;
    # check %FEATURES to see if it's there, and set it if so
    # throw XML::SAX::Exception::NotRecognized if it's not there
    # throw XML::SAX::Exception::NotSupported if it's there but we
    # don't support it
}
#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# set_handler and friends
#-------------------------------------------------------------------#
sub set_handler {
    my $self = shift;
    my ($new_handler, $handler_type) = reverse @_;
    $handler_type ||= 'Handler';
    $self->{Methods} = {} if $self->{Methods};
    $self->{$handler_type} = $new_handler;
    return 1;
}

sub set_document_handler {
    my $self = shift;
    return $self->set_handler('DocumentHandler', @_);
}

sub set_content_handler {
    my $self = shift;
    return $self->set_handler('ContentHandler', @_);
}
sub set_dtd_handler {
    my $self = shift;
    return $self->set_handler('DTDHandler', @_);
}
sub set_lexical_handler {
    my $self = shift;
    return $self->set_handler('LexicalHandler', @_);
}
sub set_decl_handler {
    my $self = shift;
    return $self->set_handler('DeclHandler', @_);
}
sub set_error_handler {
    my $self = shift;
    return $self->set_handler('ErrorHandler', @_);
}
sub set_entity_resolver {
    my $self = shift;
    return $self->set_handler('EntityResolver', @_);
}

#-------------------------------------------------------------------#

#-------------------------------------------------------------------#
# supported_features
#-------------------------------------------------------------------#
sub supported_features {
    my $self = shift;
    # Only namespaces are required by all parsers
    return (
        'http://xml.org/sax/features/namespaces',
    );
}
#-------------------------------------------------------------------#

sub no_op {
    # this space intentionally blank
}


package XML::SAX::Base::NoHandler;

# we need a fake handler that doesn't implement anything, this
# simplifies the code a lot (though given the recent changes,
# it may be better to do without)
sub new {
    return bless {};
}

1;

__END__

#line 2591

