annotate Lib/IMPL/DOM/Schema/AnyNode.pm @ 391:2287c72f303a

code cleanup
author cin
date Thu, 13 Feb 2014 20:17:22 +0400
parents 5aff94ba842f
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: 24
diff changeset
1 package IMPL::DOM::Schema::AnyNode;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
3 use warnings;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
4
389
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
5 use IMPL::declare {
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
6 base => [
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
7 'IMPL::DOM::Schema::Node' => sub {
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
8 my %args = @_;
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
9 $args{nodeName} ||= 'AnyNode';
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
10 $args{name} = '::any';
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
11
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
12 %args;
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
13 }
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
14 ]
5aff94ba842f DOM Schema refactoring complete
cin
parents: 236
diff changeset
15 };
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
16
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
17 1;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
18
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
19 __END__
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
20
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
21 =pod
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
22
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
23 =head1 DESCRIPTION
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
24
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
25 Узел с произвольным именем, для этого узла предусмотрена специальная проверка
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
26 в контейнерах.
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
27
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
28 В контейнерах типа C<IMPL::DOM::Schema::NodeSet> этот узел можно использовать только один раз
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
29 причем его использование исключает использование узла C<IMPL::DOM::Schema::SwitchNode>.
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
30
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
31 В контейнерах типа С<IMPL::DOM::Schema::NodeList> данный узел может применяться несколько раз
236
2904da230022 DOM refactoring
sergey
parents: 180
diff changeset
32 для решения таких задач как последовательности разноименных узлов с одним типом.
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
33
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
34 <NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
35 <SimpleNode name="firstName"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
36 <SimpleNode name="age"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
37 <AnyNode type="Notes" minOccur="0" maxOccur="unbounded"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
38 <Node name="primaryAddress" type="Address"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
39 <AnyNode/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
40 </NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
41
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 24
diff changeset
42 =cut