view Lib/IMPL/DOM/Transform.pm @ 106:83e356614c1e

DOM Builder now is a navigator like SimpleBuilder PostToDOM transformation
author wizard
date Wed, 12 May 2010 17:52:12 +0400
parents f017c0d7527c
children e6447ad85cb4
line wrap: on
line source

package IMPL::DOM::Transform;
use strict;
use warnings;

use base qw(IMPL::Transform);

__PACKAGE__->PassThroughArgs;

sub GetClassForObject {
    my ($this,$object) = @_;
    
    if (my $class = ref $object) {
        if (UNIVERSAL::isa($object,'IMPL::DOM::Node')) {
            return $object->nodeName;
        } else {
            return $class;
        }
    } else {
        return undef;
    }
}

1;

__END__

=pod

=head1 DESCRIPTION

Преобразование для DOM документа, использует имя документа узла для применения подходящего преобразования.

=cut