view Lib/IMPL/DOM/Transform.pm @ 122:a7efb3117295

Fixed bug in IMPL::DOM::Navigator::selectNodes Fixed bug in IMPL::DOM::Node::selectNodes renamed operator 'type' to 'typeof' in IMPL::Object::Abstract A proper implementation of the IMPL::DOM::Node::nodeProperty and a related changes in the IMPL::DOM::Property module, now the last is very simple.
author wizard
date Tue, 08 Jun 2010 20:12:45 +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