view Lib/IMPL/DOM/Schema/ComplexNode.pm @ 29:37160f7c8edb

minor changes
author Sergey
date Wed, 21 Oct 2009 17:30:20 +0400 (2009-10-21)
parents 267460284fb3
children 16ada169ca75
line wrap: on
line source
package IMPL::DOM::Schema::ComplexNode;
use strict;
use warnings;

use base qw(IMPL::DOM::Schema::Node);
use IMPL::Class::Property;

BEGIN {
    public property content => {
        get => \&_getContent,
        set => \&_setContent
    }
}

our %CTOR = (
    'IMPL::DOM::Schema::Node' => sub {my %args = @_; $args{nodeName} ||= 'ComplexNode'; %args }
);

sub _getContent {
    $_[0]->firstChild;
}

sub _setContent {
    $_[0]->firstChild($_[1]);
}

sub Validate {
    my ($this,$node) = @_;
    
    map $_->Validate($node), @{$this->childNodes};
}

1;

__END__

=pod

=head1 DESCRIPTION

��������� ������� ����. ������� ���� ������������ ���������, ���� ������������
����.

��������� ���������� ����� ���� ������� �������� ������� � �.�.
������ �������� ��������� ����� ���� ������ ���������� ����, ��. C<content>

=head2 PROPERTIES

=over

=item C<content>

���������� ����, ����� ���� ���� C<IMPL::DOM::Schema::NodeSet> ����
C<IMPL::DOM::Schema::NodeList>, � ����������� �� ���� ����� ������� ��� ���.
��� �������� ��������� �� ������ �������� ������� ����.

=back

=cut