view Lib/IMPL/DOM/Schema/ComplexNode.pm @ 171:59e5fcb59d86

Исправления, изменена концепция веб-форм
author sourcer
date Mon, 06 Jun 2011 03:30:36 +0400
parents 76515373dac0
children d1676be8afcc
line wrap: on
line source

package IMPL::DOM::Schema::ComplexNode;
use strict;
use warnings;

use parent 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,$ctx) = @_;
    
    map $_->Validate($node,$ctx), @{$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