| 7 | 1 package IMPL::DOM::Schema::ComplexNode; | 
|  | 2 use strict; | 
|  | 3 use warnings; | 
|  | 4 | 
| 18 | 5 use base qw(IMPL::DOM::Schema::Node); | 
| 7 | 6 use IMPL::Class::Property; | 
|  | 7 | 
|  | 8 BEGIN { | 
|  | 9     public property content => { | 
|  | 10         get => \&_getContent, | 
|  | 11         set => \&_setContent | 
|  | 12     } | 
|  | 13 } | 
|  | 14 | 
|  | 15 __PACKAGE__->PassThroughArgs; | 
|  | 16 | 
|  | 17 sub _getContent { | 
|  | 18     $_[0]->firstChild; | 
|  | 19 } | 
|  | 20 | 
|  | 21 sub _setContent { | 
|  | 22     $_[0]->firstChild($_[1]); | 
|  | 23 } | 
|  | 24 | 
|  | 25 sub Validate { | 
|  | 26     my ($this,$node) = @_; | 
|  | 27 | 
|  | 28     if (my $type = $this->nodeType) { | 
|  | 29         my $schemaType = $this->Schema->ResolveType($type); | 
|  | 30         return $schemaType->Validate($node); | 
|  | 31     } else { | 
|  | 32         my @errors; | 
|  | 33         push @errors, $_->Validate foreach @{$this->childNodes}; | 
|  | 34 | 
| 8 | 35         return @errors; | 
| 7 | 36     } | 
|  | 37 } | 
|  | 38 | 
|  | 39 1; | 
|  | 40 | 
|  | 41 __END__ | 
|  | 42 | 
|  | 43 =pod | 
|  | 44 | 
|  | 45 =head1 DESCRIPTION | 
|  | 46 | 
|  | 47   .    , | 
|  | 48 . | 
|  | 49 | 
|  | 50         .. | 
|  | 51        , . C<content> | 
|  | 52 | 
|  | 53 =head2 PROPERTIES | 
|  | 54 | 
|  | 55 =over | 
|  | 56 | 
|  | 57 =item C<content> | 
|  | 58 | 
|  | 59  ,    C<IMPL::DOM::Schema::NodeSet> | 
|  | 60 C<IMPL::DOM::Schema::NodeList>,        . | 
|  | 61        . | 
|  | 62 | 
|  | 63 =back | 
|  | 64 | 
|  | 65 =cut |