Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Schema/ComplexNode.pm @ 19:1ca530e5c9c5
DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
author | Sergey |
---|---|
date | Fri, 11 Sep 2009 16:30:39 +0400 |
parents | 818c74b038ae |
children | 267460284fb3 |
comparison
equal
deleted
inserted
replaced
18:818c74b038ae | 19:1ca530e5c9c5 |
---|---|
23 } | 23 } |
24 | 24 |
25 sub Validate { | 25 sub Validate { |
26 my ($this,$node) = @_; | 26 my ($this,$node) = @_; |
27 | 27 |
28 if (my $type = $this->nodeType) { | 28 map $_->Validate($node), @{$this->childNodes}; |
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 | |
35 return @errors; | |
36 } | |
37 } | 29 } |
38 | 30 |
39 1; | 31 1; |
40 | 32 |
41 __END__ | 33 __END__ |