annotate Lib/IMPL/DOM/Schema/SimpleNode.pm @ 393:69a1f1508696

minor security refactoring
author cin
date Fri, 14 Feb 2014 16:41:12 +0400
parents 648dfaf642e0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
1 package IMPL::DOM::Schema::SimpleNode;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
3 use warnings;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
4
388
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
5 use IMPL::declare {
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
6 base => [
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
7 'IMPL::DOM::Schema::Node' => sub {
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
8 my %args = @_;
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
9 $args{nodeName} ||= 'SimpleNode';
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
10 %args
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
11 }
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
12 ]
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
13 };
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
14
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
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
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
18 $ctx->{schemaNode} ||= $this; # для безымянных типов
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
19
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
20 $ctx->{schemaType} = $this;
648dfaf642e0 DOM refactoring,
cin
parents: 278
diff changeset
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
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
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
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
29 1;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
30
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
31 __END__
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
32
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
33 =pod
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
34
103
c289ed9662ca Schema beta 2
wizard
parents: 49
diff changeset
35 =head1 NAME
c289ed9662ca Schema beta 2
wizard
parents: 49
diff changeset
36
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
37 C<IMPL::DOM::SimpleNode> - узел с текстом.
103
c289ed9662ca Schema beta 2
wizard
parents: 49
diff changeset
38
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
39 =head1 DESCRIPTION
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
40
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
41 Узел имеющий простое значение. Данный узел может содержать ограничения
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
42 на простое значение.
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
43
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
44 Производит валидацию содержимого, при постоении DOM модели не имеет специального
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
45 типа и будет создан в виде C<IMPL::DOM::Node>.
103
c289ed9662ca Schema beta 2
wizard
parents: 49
diff changeset
46
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
47 Также определяет как будет воссоздано значение узла в DOM модели.
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
48
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 20
diff changeset
49 =cut