Mercurial > pub > Impl
diff 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 |
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Schema/Node.pm Tue Feb 11 01:13:47 2014 +0400 +++ b/Lib/IMPL/DOM/Schema/Node.pm Tue Feb 11 20:22:01 2014 +0400 @@ -47,8 +47,10 @@ sub Validate { my ($this,$node,$ctx) = @_; + $ctx->{schemaNode} = $this; # запоминаем источник ссылки + if (my $schemaType = $this->{$type} ? $this->document->ResolveType($this->{$type}) : undef ) { - my @errors = $schemaType->Validate($node,{Source => $this}); + my @errors = $schemaType->Validate($node,$ctx); return @errors; } else { return ();