Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Schema/NodeSet.pm @ 102:cf3b6ef2be22
Schema beta version
author | wizard |
---|---|
date | Fri, 07 May 2010 08:05:23 +0400 |
parents | df6b4f054957 |
children | a4b0a819bbda |
comparison
equal
deleted
inserted
replaced
101:d8dc6cad3f55 | 102:cf3b6ef2be22 |
---|---|
42 if (my $info = $nodes{$child->nodeName} || $anyNode) { | 42 if (my $info = $nodes{$child->nodeName} || $anyNode) { |
43 $info->{Seen}++; | 43 $info->{Seen}++; |
44 push @errors,new IMPL::DOM::Schema::ValidationError ( | 44 push @errors,new IMPL::DOM::Schema::ValidationError ( |
45 Source => $this, | 45 Source => $this, |
46 Node => $child, | 46 Node => $child, |
47 Parent => $node, | |
47 Schema => $info->{Schema}, | 48 Schema => $info->{Schema}, |
48 Message => $this->messageMax | 49 Message => $this->messageMax |
49 ) if ($info->{Max} and $info->{Seen} > $info->{Max}); | 50 ) if ($info->{Max} and $info->{Seen} > $info->{Max}); |
50 | 51 |
51 if (my @localErrors = $info->{Schema}->Validate($child)) { | 52 if (my @localErrors = $info->{Schema}->Validate($child)) { |
53 } | 54 } |
54 } else { | 55 } else { |
55 push @errors, new IMPL::DOM::Schema::ValidationError ( | 56 push @errors, new IMPL::DOM::Schema::ValidationError ( |
56 Source => $this, | 57 Source => $this, |
57 Node => $child, | 58 Node => $child, |
59 Parent => $node, | |
58 Message => $this->messageUnexpected | 60 Message => $this->messageUnexpected |
59 ) | 61 ) |
60 } | 62 } |
61 } | 63 } |
62 | 64 |
63 foreach my $info (values %nodes) { | 65 foreach my $info (values %nodes) { |
64 push @errors, new IMPL::DOM::Schema::ValidationError ( | 66 push @errors, new IMPL::DOM::Schema::ValidationError ( |
65 Source => $this, | 67 Source => $this, |
66 Schema => $info->{Schema}, | 68 Schema => $info->{Schema}, |
69 Parent => $node, | |
67 Message => $this->messageMin | 70 Message => $this->messageMin |
68 ) if $info->{Min} > $info->{Seen}; | 71 ) if $info->{Min} > $info->{Seen}; |
69 } | 72 } |
70 | 73 |
71 return @errors; | 74 return @errors; |