Mercurial > pub > Impl
annotate Lib/IMPL/DOM/Schema/SimpleNode.pm @ 392:54b1dc9e808a
fixed web-resources access check
author | sergey |
---|---|
date | Fri, 14 Feb 2014 03:31:45 +0400 |
parents | 648dfaf642e0 |
children |
rev | line source |
---|---|
49 | 1 package IMPL::DOM::Schema::SimpleNode; |
2 use strict; | |
3 use warnings; | |
4 | |
388 | 5 use IMPL::declare { |
6 base => [ | |
7 'IMPL::DOM::Schema::Node' => sub { | |
8 my %args = @_; | |
9 $args{nodeName} ||= 'SimpleNode'; | |
10 %args | |
11 } | |
12 ] | |
13 }; | |
49 | 14 |
15 sub Validate { | |
104
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
16 my ($this,$node,$ctx) = @_; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
17 |
388 | 18 $ctx->{schemaNode} ||= $this; # для безымянных типов |
19 | |
20 $ctx->{schemaType} = $this; | |
21 | |
104
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
22 my @result; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
23 |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
24 push @result, $_->Validate($node,$ctx) foreach $this->childNodes; |
49 | 25 |
104
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
26 return @result; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
27 } |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
103
diff
changeset
|
28 |
49 | 29 1; |
30 | |
31 __END__ | |
32 | |
33 =pod | |
34 | |
103 | 35 =head1 NAME |
36 | |
180 | 37 C<IMPL::DOM::SimpleNode> - узел с текстом. |
103 | 38 |
49 | 39 =head1 DESCRIPTION |
40 | |
180 | 41 Узел имеющий простое значение. Данный узел может содержать ограничения |
42 на простое значение. | |
49 | 43 |
180 | 44 Производит валидацию содержимого, при постоении DOM модели не имеет специального |
45 типа и будет создан в виде C<IMPL::DOM::Node>. | |
103 | 46 |
180 | 47 Также определяет как будет воссоздано значение узла в DOM модели. |
49 | 48 |
49 =cut |