comparison Lib/IMPL/DOM/Schema/Node.pm @ 388:648dfaf642e0

DOM refactoring, removed inflators from DOM Schema, DOM validation - in progress
author cin
date Tue, 11 Feb 2014 20:22:01 +0400
parents 4edd36025051
children
comparison
equal deleted inserted replaced
387:4cc6cc370fb2 388:648dfaf642e0
45 } 45 }
46 46
47 sub Validate { 47 sub Validate {
48 my ($this,$node,$ctx) = @_; 48 my ($this,$node,$ctx) = @_;
49 49
50 $ctx->{schemaNode} = $this; # запоминаем источник ссылки
51
50 if (my $schemaType = $this->{$type} ? $this->document->ResolveType($this->{$type}) : undef ) { 52 if (my $schemaType = $this->{$type} ? $this->document->ResolveType($this->{$type}) : undef ) {
51 my @errors = $schemaType->Validate($node,{Source => $this}); 53 my @errors = $schemaType->Validate($node,$ctx);
52 return @errors; 54 return @errors;
53 } else { 55 } else {
54 return (); 56 return ();
55 } 57 }
56 } 58 }